TransWikia.com

find command "finds" file I'm looking for but it doesn't exist

Unix & Linux Asked on November 14, 2021

I am searching for a particular file so I use the find command and it finds the file that I’m looking for:

$ 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

Running ls -l /System/Volumes/Data/System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif, I get the following.

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

Running find / -name connect_power.aif -ls yields:

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

So, according to the output, it’s found the file in two different locations. I can get to the first one, but I cannot get to the second. Specifically, it "breaks" when I get to the PowerChime.app sub directory – it errors out and says it doesn’t exist. So, how did find find it and how can I get to it?

For the record, this is on macOS Catalina (10.15.5) but it’s not a Apple/Mac centric question as I’ve run across this in FreeBSD as well.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP