現在のパスのすべてのファイル/バイナリを一覧表示する

現在のパスのすべてのファイル/バイナリを一覧表示する

現在のパスにあるすべてのファイル/実行可能なバイナリを一覧表示するために "ls -la"スタイルコマンドを実行する "簡単な"方法はありますか?

(未知の接頭辞がありますが、基本的に既知の「名前」を持つコマンドを見つけるために出力をgrepにパイピングする予定です。この場合、bashのオートコンプリート/タブは基本的に役に立ちません。機能です。」

ベストアンサー1

compgen -c # will list all the commands you could run.
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. 

おすすめ記事