歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> Linux學習筆記--whereis命令(搜索命令的命令)

Linux學習筆記--whereis命令(搜索命令的命令)

日期:2017/3/1 12:16:21   编辑:關於Linux

whereis,在哪裡的意思,作用是搜索命令所在位置及幫助文檔所在位置。

whereis命令特點:

1) "whereis"命令只能查找系統命令,不能搜索普通文件。
2) "whereis"命令跟"locate"命令一樣是從數據庫中查找數據,所以查詢速度快。

1. 命令格式:

whereis [選項] 命令名

2. 常用選項:

"whereis -b" 只查找可執行文件的位置。
"whereis -m" 只查找幫助文檔的位置。(m為man的意思)
"whereis -s" 查找源代碼文件的位置。(s為source的意思)

3. 常用范例:

1) 查看命令"pwd"的位置和幫助文檔的位置

這裡寫圖片描述

2) 只查看命令"pwd"的位置

這裡寫圖片描述<喎?http://www.2cto.com/kf/ware/vc/" target="_blank" class="keylink">vcD4NCjxwcmUgY2xhc3M9"brush:sql;"> 3) 只查看命令"pwd"的幫助文檔的位置

這裡寫圖片描述

Copyright © Linux教程網 All Rights Reserved