where

英[weə(r)] 美[wer]

adv.Where, where; to where; a certain situation or position

conj.The place of…

n.Place, location

pron.Where

Plural: wheres

Linux whereis command syntax

Function: whereis command is used to find files.

Syntax: whereis [-bfmsu][-B <Directory>...][-M <Directory>...][-S <Directory> ;...][document...]

Linux whereis command example

Use the command "whereis" to view the location of the command "bash" and enter the following command:

$ whereis bash

After the above command is executed, the output information is as follows:

bash:/bin/bash/etc/bash.bashrc/usr/share/man/man1/bash.1.gz

Note: The above output The information from left to right is the queried program name, bash path, and bash man page path.

If the user needs to query the binary file or help file separately, he can use the following command:

$ whereis -b bash 
$ whereis -m bash

The 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命令的帮助文件地址