find コマンドでファイルリストを表示する - Bash
published:
特定のディレクトリ内のファイル一覧を、 find コマンドを使って表示(取得)する。
ファイル一覧を表示
$ find . -type f
ファイル一覧をソートして表示
$ find . -type f | sort
特定のファイルを除外して、ファイル一覧を表示
$ find . -type f -not -name '.DS_Store'
特定のファイルを除外したうえで、ファイル一覧をソートして表示
$ find . -type f -not -name '.DS_Store' | sort