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

따라서 출력에 따르면 두 개의 다른 위치에서 파일을 찾았습니다. 첫 번째에는 도달할 수 있지만 두 번째에는 도달할 수 없습니다. 특히 PowerChime.app하위 디렉터리에 도달하면 "중단"됩니다. 오류가 발생하고 존재하지 않는다고 말합니다. 그렇다면 find그것을 찾는 방법과 찾는 방법은 무엇입니까?

기록상 이것은 macOS Catalina(10.15.5)에 있지만 FreeBSD에서도 이 문제가 발생했기 때문에 이것은 Apple/Mac 중심 문제가 아닙니다.

관련 정보