the "whereis" LINUX command
i don't understand the whereis command in the linux terminal. it's used to find files. i search the internet and what they showed me is not comprehensible. how do i use the "whereis" command? please.
|
Code:
# Only locations: |
It's manual has all answers, just go through it (see here)
Take a note, whereis won't search for files, but whereis locates source/binary and manuals sections for specified files. Code:
~$ whereis ls Code:
~$ whereis foo |
thanks you very much :)
|
To locate regular files by name or pattern, you should generally use the locate command (imagine that ;)).
Be aware, however, that locate works by reading a previously-indexed snapshot of your system tree, created by the updatedb program. If changes have been made since the database was last refreshed you can get inaccurate results. Most distributions set up an automatic cronjob to run updatedb for you, usually once a day. For truly up-to-date results, you need to use find instead: http://mywiki.wooledge.org/UsingFind http://www.grymoire.com/Unix/Find.html |
All times are GMT -5. The time now is 12:32 AM. |