$ PATHのすべてのバイナリを一覧表示

$ PATHのすべてのバイナリを一覧表示

Bashの$ PATHにあるすべての実行可能ファイルをリストするコード行はありますか?

ベストアンサー1

これは答えではありませんが、実行できるバイナリとコマンドを示しています。

compgen -c

(仮説bash

その他の便利なコマンド

compgen -a # will list all the aliases you could run.
compgen -b # will list all the built-ins you could run.
compgen -k # will list all the keywords you could run.
compgen -A function # will list all the functions you could run.
compgen -A function -abck # will list all the above in one go.

おすすめ記事