国产探花免费观看_亚洲丰满少妇自慰呻吟_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的區別的講解,如有疑問請留言或者到本站社區交流討論,大家共同進步,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 泸州市| 青州市| 杨浦区| 灵山县| 亳州市| 曲麻莱县| 乐都县| 昌邑市| 临颍县| 中阳县| 乳山市| 阳新县| 壶关县| 禹州市| 建始县| 焦作市| 黑山县| 敖汉旗| 湛江市| 柳林县| 平舆县| 丰原市| 和硕县| 黄梅县| 闸北区| 托克托县| 阳江市| 富宁县| 临夏县| 渭源县| 湘西| 崇文区| 铁力市| 东辽县| 三都| 迁西县| 兴业县| 大荔县| 顺平县| 金坛市| 禄丰县|