【每天一个Linux命令】13. Linux中whereis命令的用法

 
命令用途

whereis命令用来查找命令的位置,包括执行文件、源代码和手册页文件

命令用法

1. 查找指定命令<command>的位置,包括执行文件、源代码和手册页文件

格式:whereis <command>

例子:
bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~$ whereis find
find: /usr/bin/find /usr/bin/X11/find /usr/share/man/man1/find.1.gz

2. 只查找指定命令<command>的执行文件位置

格式:whereis -m <command>

例子:

bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~$ whereis -b find
find: /usr/bin/find /usr/bin/X11/find

3.  只查找指定命令<command>的手册页文件所在位置

格式:whereis -s <command>

例子:

bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~$ whereis -m find
find: /usr/share/man/man1/find.1.gz

4. 只查找指定命令<command>的源代码所在位置

格式:whereis -s <command>

例子:

bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~$ whereis -s find
find:




 

 

posted @ 2013-09-18 19:51  pangbangb  阅读(264)  评论(0编辑  收藏  举报