歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux基礎知識 >> 【linux】which和whereis

【linux】which和whereis

日期:2017/3/2 17:14:19   编辑:Linux基礎知識

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
Copyright © Linux教程網 All Rights Reserved