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」指令可以显示终端机指令输入后会运行的文件路径。

选项 D,没有「query」指令。

选项 E,「whereis」指令可以找出所有可执行文件、源代码、手册的所在路径,为正确答案。