Thursday, August 11, 2016

Using whereis

Using whereis


The whereis command locates the source code, binary files, and manuals pages for specified files. The –b option returns the location of the binaries for the specified command.

The –m option returns the location of the command’s manual pages. To see the location of the command’s source code, use the –s option with the whereis command. If no option is used, all information is returned.

For example, if you enter whereis –b ls at the shell prompt, the location of the ls command’s binary executable file is returned. An example is shown here:

openSUSE:/ # whereis -b ls
ls: /bin/ls

Likewise, entering the whereis –m ls command returns the location of the ls command’s man page file, as shown next:

openSUSE:/ # whereis -m ls
ls: /usr/share/man/man1p/ls.1p.gz /usr/share/man/man1/ls.1.gz

No comments:

Post a Comment