문제

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?

도움이 되었습니까?

해결책

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

enter image description here

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 apple.stackexchange
scroll top