说明

  whereis命令用于定位命令的可执行文件、源码文件及man帮助文件的路径

格式

  whereis [option] [filename]

常用参数
  • -b:查找可执行文件
  • -m:查找man帮助文件
  • -s:查找源码文件
示例
  1. [root@localhost ~]# whereis which
  2. which: /usr/bin/which /usr/share/man/man1/which.1.gz
  3. [root@localhost ~]# whereis -s which
  4. which:
  5. [root@localhost ~]# whereis -m which
  6. which: /usr/share/man/man1/which.1.gz
  7. [root@localhost ~]# whereis -b which
  8. which: /usr/bin/which