Pregunta

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?

¿Fue útil?

Solución

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

enter image description here

Otros consejos

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a apple.stackexchange
scroll top