Linux whereis command
Linux whereis command to locate the file.
This instruction will find qualified files in the specified directory. These documents should be part of the original code, binary files, or help files.
This instruction can only be used to find binary files, locate the source code files and man pages, generally need to use the file command to locate.
grammar
whereis [-bfmsu][-B <目录>...][-M <目录>...][-S <目录>...][文件...]
Parameters:
Examples
Using the command "whereis" view instruction "bash" position, enter the following command:
$ whereis bash
After the above instruction is executed, the output information is as follows:
bash:/bin/bash/etc/bash.bashrc/usr/share/man/man1/bash.1.gz
Note: The above information is output from left to right are the program name query, bash path, bash man page path.
If the user requires a separate query binary file or help file, use the following command:
$ whereis -b bash $ whereis -m bash
Output information is as follows:
$ whereis -b bash #显示bash 命令的二进制程序 bash: /bin/bash /etc/bash.bashrc /usr/share/bash # bash命令的二进制程序的地址 $ whereis -m bash #显示bash 命令的帮助文件 bash: /usr/share/man/man1/bash.1.gz #bash命令的帮助文件地址