【Linux】ファイル検索コマンド

ファイル検索でよく使うコマンド

例:find -P ./ -type f -maxdepth 1 -iname "*.png" -o -iname "*.mov"

#ファイルを検索 「-type d」 はディレクトリ
-type f

#検索するディレクトリの最大の深さ(-maxdepth 1は、指定したファイル直下でのみ検索)
-maxdepth 1

#大文字小文字を区別しない
-iname 【ファイル名】