Cannot ls ~/.Trash in the Terminal in Catalina (operation not permitted)
-
25-05-2021 - |
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?
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.