かなぽんのブログ

フロントエンドエンジニアの雑記

指定ディレクトリ配下のファイル一覧を表示・コピー・出力するLinuxコマンド

hoge配下のファイル一覧を表示

ls -u $(find hoge/* -type f )

hoge配下のファイル一覧をクリップボードにコピー

ls -u $(find hoge/* -type f ) | pbcopy

hoge配下のファイル一覧をfilelist.txtに出力

ls -u $(find hoge/* -type f ) > filelist.txt