This is a safety net. You can use it to make double-dog sure that you are not accidentally invoking some function. For example, suppose we redefine "sort" in bash:
function sort { echo "Not today" }
After this, trying to sort a file doesn't do much:
apl$ sort t not today
But "command sort t" will work.
"command" can also just tell you what would be used:
apl$ command -V sort sort is a function sort () { echo "Not today" }
It can also help if you think your PATH might be screwy:
~ apl$ PATH=./bin ~ apl$ sort t bash: sort: command not found ~ apl$ command -p sort t abc abc abc def def def foo geh geh geh
Got something to add? Send me email.
More Articles by Tony Lawrence © 2011-07-06 Tony Lawrence
The people I distrust most are those who want to improve our lives but have only one course of action in mind. (Frank Herbert)
Printer Friendly Version
command Copyright © December 2003 Tony Lawrence
Have you tried Searching this site?
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.
Contact us
Printer Friendly Version