Linux 拥有强大的搜索功能,但是强大带来的缺点是相对赚复杂。但是大家不用担心,搜索命令只是选项较多,不容易记忆而已,并不难理解。
在使用搜索命令的时候,大家还是需要注意,如果搜索的范围过大、搜索的内容过多,则会给系统造成巨大的压力,所以不要在服务器访问的高峰执行大范围的搜索命令。
whereis 是搜索系统命令的命令,也就是说,whereis 命令不能搜索普通文件,而只能搜索系统命令。
命令名称:whereis。
英文原意:locate the binary, source, and manual page files for a command。
所在路径:/usr/bin/whereis.
执行权限:所有用户。
功能描述:査找二进制命令、源文件和帮助文档的命令。
[root@localhost ~]# whereis [选项] 命令
选项:
-b: 只査找二制命令;
-m: 只查找帮助文档;
[root@VM_0_10_centos /]# whereis ls
ls: /bin/ls /usr/share/man/man1/ls.1.gz
[root@VM_0_10_centos /]# whereis -b ls
ls: /bin/ls
[root@VM_0_10_centos /]# whereis -m ls
ls: /usr/share/man/man1/ls.1.gz