commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
The wherepath function will search all the directories in your PATH and print a unique list of locations in the order they are first found in the PATH. (PATH often has redundant entries.) It will automatically use your 'ls' alias if you have one or you can hardcode your favorite 'ls' options in the function to get a long listing or color output for example.
'whereis' only searches certain fixed locations.
'which -a' searches all the directories in your path but prints duplicates.
'locate' is great but isn't installed everywhere (and it's often too verbose).
There is 1 alternative - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.