0

特定の Linux 実行可能ファイルの完全なパスを見つける必要がありますか? これどうやってするの?

たとえば、cat の実際のパスは /bin/cat です。

4

3 に答える 3

3

whichまたはを使用locate:

$ which cat
/bin/cat
于 2013-09-07T15:26:59.050 に答える
2

次のコマンドを使用できます。

$ which ifconfig
/sbin/ifconfig
于 2013-09-07T15:27:20.913 に答える
1

which programまたwhereis program

$  whatis which
which                (1)  - shows the full path of (shell) commands

$  whatis whereis
whereis              (1)  - locate the binary, source, and manual page files for a command
于 2013-09-07T15:27:17.643 に答える