# # command
APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Command

I've removed advertising from most of this site and will eventually clean up the few pages where it remains.

While not terribly expensive to maintain, this does cost me something. If I don't get enough donations to cover that expense, I will be shutting the site down in early 2020.

If you found something useful today, please consider a small donation.



Some material is very old and may be incorrect today

© December 2003 Tony Lawrence

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


If you found something useful today, please consider a small donation.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> command


Inexpensive and informative Apple related e-books:

Take Control of High Sierra

Take Control of IOS 11

Take Control of iCloud

Photos: A Take Control Crash Course

iOS 10: A Take Control Crash Course





More Articles by © Tony Lawrence





Printer Friendly Version

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





The people I distrust most are those who want to improve our lives but have only one course of action in mind. (Frank Herbert)




Linux posts

Troubleshooting posts


This post tagged:

Scripting

Shell

UnixWords



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode