which
Find a file in an environment variable
-A finds all content, not the first file
-n < filename length > Specifies a filename length that must be greater than or equal to the longest file name in all files.
-p < filename length > is the same as-n parameter, but here < filename length > includes the path to the file.
-W Specifies the width of the field when output.
-V Displays version information.
Cases:
The code is as follows:
[Zhangy@blackghost download]$ which find
/usr/bin/find
Whereis
Syntax of the Whereis command: Whereis [-BMSU] [BMS directory name-f] File name
The options for the Whereis command have the following meanings:
-B locates the executable file.
-M locate Help file.
-S locates the source code file.
-U searches for files other than executables, source code files, and Help files under the default path.
-b Specifies the path to search for an executable file.
-m specifies the path to the search Help file.
-s specifies the path to the search source code file.
Cases:
The code is as follows:
[Root@localhost ~]# Whereis Nginx
Nginx:/usr/sbin/nginx/etc/nginx/usr/share/nginx/usr/share/man/man3/nginx.3pm.gz