Which of the following commands can be used to locate programs and their corresponding man pages and configuration files?



A.

dirname

B.

which

C.

basename

D.

query


E.

whereis

題解

選項A,「dirname」指令可以取得一個完整的檔案路徑中,存放檔案的目錄路徑。相對地,「basename」指令就是取得最後的檔名。

選項B,「which」指令可以顯示終端機指令輸入後會執行的檔案路徑。

選項C,沒有「query」指令。

選項D,「whereis」指令可以找出所有執行檔、原始碼、手冊的所在路徑,為正確答案。