Linux常用命令-whereis

命令

whereis

描述

locate the binary, source, and manual page files for a command
显示命令路径和文档路径

用法

1
whereis [options] name...

选项

1
2
3
4
5
Options:
-b 只显示二进制文件路径
-m 只显示man帮助文件路径
-s 只显示源码路径
-l 显示所有搜索路径,包括bin,man,src路径

注意

示例

1
2
3
4
5
6
$ whereis ls
ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz
$ whereis -b ls
ls: /usr/bin/ls
$ whereis -m ls
ls: /usr/share/man/man1/ls.1.gz