Linux
  1. Linux文件和目录管理
  2. Linux打包和压缩
  3. Linux文本管理
  4. Linux用户和用户组
  5. Linux权限管理
  6. Linux进程管理
  7. Linux命令
    1. Linux stat命令:显示文件或文件系统的详细信息-7.1
    2. Linux man命令:显示联机帮助手册-7.2
    3. Linux info命令:info格式的命令帮助指令-7.3
    4. Linux whereis命令:査找二进制命令、源文件和帮助文档-7.4
    5. Linux which命令:列出命令的所在路径-7.5
    6. Linux find命令:在目录中查找文件-7.6
    7. Linux shutdown命令:关机和重启-7.7
    8. Linux ifconfig命令:查看和临时修改IP地址-7.8
    9. Linux ping命令:测试主机通信情况命令-7.9
    10. linux netstat命令:网络状态查看命令-7.10

Linux whereis命令:査找二进制命令、源文件和帮助文档-7.4

程序员日记      2019-08-01

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