国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 服務器 > Linux服務器 > 正文

Linux命令搜索命令whereis與which的區別

2024-09-05 23:04:09
字體:
來源:轉載
供稿:網友

Linux命令搜索命令whereis與which的區別

一 whereis

1、語法

whereis 命令名

搜索命令所在的路徑以及幫助文檔所在的位置

選項:

-b:只查找可執行文件
-m:只查找幫助文件

2、實戰

[root@localhost ~]# whereis lsls:/usr/bin/ls /usr/share/man/man1/ls.1.gz/usr/share/man/man1p/ls.1p.gz[root@localhost ~]# whoamiroot[root@localhost ~]# whatiswhatis what?[root@localhost ~]# whatis lsls (1)- list directory contentsls (1p)- list directory contents[root@localhost ~]# whereis -b lsls:/usr/bin/ls[root@localhost ~]# whereis -m lsls:/usr/share/man/man1/ls.1.gz/usr/share/man/man1p/ls.1p.gz

二 which

1、語法

which 命令名

搜索命令所在路徑及別名

2、實戰

[root@localhost ~]# which lsalias ls='ls --color=auto'/usr/bin/ls[root@localhost ~]# which pwd/usr/bin/pwd[root@localhost ~]# whereis cdcd:/usr/bin/cd /usr/share/man/man1/cd.1.gz/usr/share/man/man1p/cd.1p.gz[root@localhost ~]# which cd/usr/bin/cd

三 PATH環境變量

定義的是系統搜索命令的路徑

[root@localhost ~]# echo $PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin

以上就是Linux命令搜索命令whereis與which的區別的講解,如有疑問請留言或者到本站社區交流討論,大家共同進步,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 广饶县| 淮阳县| 图们市| 宜州市| 江津市| 湘西| 肇源县| 淳安县| 广平县| 色达县| 昌江| 边坝县| 邢台县| 本溪| 离岛区| 洛南县| 宝兴县| 汉寿县| 博罗县| 霍邱县| 福清市| 克什克腾旗| 通渭县| 南漳县| 正阳县| 体育| 西平县| 洞口县| 和静县| 鞍山市| 罗江县| 大名县| 双辽市| 凌源市| 苗栗市| 德昌县| 延吉市| 招远市| 临颍县| 博湖县| 武宁县|