You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Need to recover file from trash on external drive

I tried to delete a file on an external HD by selecting "move to trash" and accidentally deleted the parent folder. I need it back. Many sites say to click on the trash folder in the dock and select the external drive, but it is not there - there is no option to see trash on the external drive. In the external drive in finder I enabled show hidden folders (there are three), but there is no .trash folder. I am using Ventura 13.1 and the file system on the external drive is exFat.

Posted on Jan 31, 2023 9:24 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 31, 2023 12:16 PM

Edmund220 wrote:

Thanks, this is definitely on the right track. However, using the command you suggested in Terminal I get "Operation not permitted". I did it again prefixed with sudo, and it asked for my password but still said Operation not permitted.
There must be a permission or setting that I'm not aware of. I am the only user of this Mac Mini and I am an Admin.


That I can explain. In recent versions of macOS, you need to grant Terminal (and other applications) "Full Disk Access" if they need to access files in multiple locations, such as external drives.

I always have that set, so I didn't remember.

Similar questions

9 replies
Question marked as Top-ranking reply

Jan 31, 2023 12:16 PM in response to Edmund220

Edmund220 wrote:

Thanks, this is definitely on the right track. However, using the command you suggested in Terminal I get "Operation not permitted". I did it again prefixed with sudo, and it asked for my password but still said Operation not permitted.
There must be a permission or setting that I'm not aware of. I am the only user of this Mac Mini and I am an Admin.


That I can explain. In recent versions of macOS, you need to grant Terminal (and other applications) "Full Disk Access" if they need to access files in multiple locations, such as external drives.

I always have that set, so I didn't remember.

Jan 31, 2023 11:28 AM in response to Luis Sequeira1

Thanks, but opening the trash from my dock revealed only files deleted from my MacHD. It did not show any files deleted from the external drive, which was mounted. Everyone says I should be able to see contents of trash from all mounted volumes, and I would love to know how to do this.


I could not see the .trashes folder on the external drive despite enabling hidden files. However I found a 3rd party utility called Path Finder that could see the .trashes folder on the external drive, and inside it I found what I was looking for and was able to restore it. I would also love to know how to see the .trashes folder without using a 3rd party app.

Jan 31, 2023 11:49 AM in response to Edmund220

I have no idea why you can't see the items when you open the Trash directly from the Dock.

I have just tried, to confirm I was not misremembering, and indeed stuff that I trashed from an external folder appears there. One can even control-click and choose Put Back and it is restored to its original location.


Maybe it has to do with how the drive is formatted? Mine are all APFS or HFS+ and they behave as I described.

Jan 31, 2023 11:56 AM in response to Luis Sequeira1

Thanks, this is definitely on the right track. However, using the command you suggested in Terminal I get "Operation not permitted". I did it again prefixed with sudo, and it asked for my password but still said Operation not permitted.

There must be a permission or setting that I'm not aware of. I am the only user of this Mac Mini and I am an Admin.

Jan 31, 2023 12:48 PM in response to Luis Sequeira1

Luis, I granted Terminal full disk access. Now when I enter the command ls /volumes/Sabrent/.Trashes, Terminal finds only a file called "._501". There are many other deleted files in the .trashes folder, which I can see in the Path Finder utility, but are not listed in the ls command. When I enter the specific path for one of the other deleted folders in the ls command, Terminal returns "file not found".

You have been very helpful, and I'm marking you best answer. I'm going to study further when I get a chance.

Ed

Jan 31, 2023 11:02 PM in response to Edmund220

Sorry to be giving details piecemeal, but these are things that I don’t deal with often. Yes, that 501 or 502 etc thing is normal, too… 😎

The very first user account on each mac has the user number 501 - so that is you. Your trashed files will go inside the 501 folder, if there is another account their trashed files will go into 502…

That is how trash from different users is kept separate.


Need to recover file from trash on external drive

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.