Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 667 Bytes

whereis.md

File metadata and controls

28 lines (24 loc) · 667 Bytes

whereis

查找二进制文件、源码和man手册文件

该命令并不会搜索整个文件系统,只查找部分目录:/bin、/etc/、/usr/share/man

基本用法

whereis 选项 要查找的文件名

可以一次性查找多个文件
下面介绍各种选项

指定搜索的类型

选项 描述
-b 二进制文件
-m man手册
-s 源码

指定搜索路径

选项 描述
-B 指定搜索二进制文件时的路径
-M 指定搜索man手册时的路径
-S 指定搜索源码时的路径
-f 用于终止,要搜索的目录列表

比如:
whereis -B /usr/bin /usr/local/bin -f ls