findコマンドは、私が探しているファイルを「検索しますが」存在しません。

findコマンドは、私が探しているファイルを「検索しますが」存在しません。

特定のファイルを検索しているので、次のfindコマンドを使用すると、私が探しているファイルを探します。

$ find / -name connect_power.aif 2>&1 | grep -v "Operation not permitted\|Permission denied\|No such file or directory"

/System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif
/System/Volumes/Data/System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif

実行すると、ls -l /System/Volumes/Data/System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif次のメッセージが表示されます。

ls: /System/Volumes/Data/System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif: No such file or directory

実行中のfind / -name connect_power.aif -ls出力:

1152921500311980401      240 -rw-r--r--    1 root             wheel              159358 Feb 29 03:49 /System/Volumes/Data/System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif

したがって、出力によると、2つの異なる場所でファイルを見つけました。最初は到達できますが、2番目は到達できません。特に、PowerChime.appサブディレクトリに到達すると「中断」されます。エラーが発生し、存在しないと言います。それでは、findそれを見つける方法とそれを見つける方法は何ですか?

記録上、これはmacOS Catalina(10.15.5)にありますが、FreeBSDでもこの問題が発生したため、これはApple / Mac中心の問題ではありません。

ベストアンサー1

おすすめ記事