菜比之路

走菜比的路,让大牛说去吧
  博客园  :: 首页  :: 新随笔  :: 联系 :: 管理

【linux】which和whereis

Posted on 2016-06-02 10:38  毕加索的ma  阅读(190)  评论(0编辑  收藏  举报

which和whereis都是查询命令的指令。区别的是:

which能查询到命令所在位置:

[root@andon tmp]# which ls
alias ls='ls --color=auto'
	/bin/ls

whereis 不仅能查询到命令所在位置,还能查到此命令的帮助文档

[root@andon tmp]# whereis ls
ls: /bin/ls /usr/share/man/man1p/ls.1p.gz /usr/share/man/man1/ls.1.gz