macのターミナルでカレントディレクトリ以下の指定文字列を含むファイルを探す

macOSのファイルインデックスが効くので高速らしい
mdfind -onlyin . -name foo.txt
完全一致結果が必要な場合
mdfind -onlyin . -name foo.txt | grep "/foo.txt$"

コメント

このブログの人気の投稿