24

Ever since buying a new Mac, which has forced me to upgrade to Catalina, I cannot view the Trash folder in the Terminal. ls ~/.Trash just gives ls: .Trash: Operation not permitted. So does sudo ls ~/.Trash. According to ls -al ~, the permissions for ~/.Trash are drwx------, and the owner is me. sudo chmod a+x ~/.Trash and sudo rm -rf ~/.Trash both fail with the same error.

Is it possible to view the Trash in the terminal in Catalina?

1
33

You have to give the Terminal.app Full Disk permissions in the security settings.

enter image description here

1
  • 2
    Interesting! While this may seem like a giant hassle, it's clear to me that this decision could also potentially block a whole lot of malware. I think I actually support this design decision on Apple's part. – John Clements Jan 23 '20 at 21:29
0

I have gone through many solutions and this one is the best. Let me tell you that this also does not help to delete the files but makes life easy.

By giving the 'Full Disk Access' to terminal you can actually go inside with 'cd' and see the content and even by giving '777' permission to all the content there you can move everything outside '.Trash' in some other folder and keep the stuff parked there. This will get away the annoying 'Files are in use' warning and you can use empty your trash bin normally.

This is a great solution, if you do not mind one unnecessary folder of 0 size lying in your disk.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .