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

首頁 > 系統 > Linux > 正文

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

2024-08-28 00:02:25
字體:
來源:轉載
供稿:網友

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的區別的講解,如有疑問請留言或者到本站社區交流討論,大家共同進步,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 大丰市| 朔州市| 安国市| 六盘水市| 闻喜县| 武功县| 新河县| 萍乡市| 洪江市| 乳山市| 台湾省| 开鲁县| 应城市| 扎兰屯市| 连州市| 隆昌县| 荥经县| 巧家县| 九台市| 海原县| 安溪县| 固原市| 女性| 乐平市| 京山县| 通河县| 固原市| 双柏县| 凌云县| 三台县| 墨竹工卡县| 溧水县| 陈巴尔虎旗| 温宿县| 雷波县| 湘阴县| 临汾市| 诸暨市| 沾益县| 深水埗区| 井陉县|