Sorry if this is in the wrong forum. How do I delete or move individual files in any trashcan in the Terminal? It can be my user trashcan or all user trashcan directories.
I know how to move around to different trashcans in different user folders, and on other volumes. But I don't know how to choose what to delete. I'd like to be able to see every single file that's in every single trashcan and choose which ones to keep, move or which ones to delete in one command if possible. Also, I'd like a readout of files being deleted or moved? (I partly know the command for that).
This command takes me to a different user's folder on a different drive and shows me the contents. But, even though I can see them in my users account in the Finder and I can remove one file and then empty the trash, then put the file back in the trash, it would be great to do it in the Terminal, and save a lot of time. I didn't know if the Trash being an invisible directory required something different.
$ cd /Volumes/volumename
mac-pro:volumename admin$ cd ~/.Trash
mac-pro:.Trash admin$ ls -1 | wc -l
0
mac-pro:.Trash admin$ cd ..
mac-pro:~ admin$ cd /volumename/.Trashes/503
mac-pro:503 admin$ ls
File 1 - File 2
Ok, so I see the two files. How do I delete File 1 and move File 2 to my home desktop, but not touch ANYTHING else?
Because I have lots of hard drives, I sometimes need to copy a file from another users trashcan to my desktop, while deleting the other. Btw, all the accounts on this computer are mine.
Thanks!
I know how to move around to different trashcans in different user folders, and on other volumes. But I don't know how to choose what to delete. I'd like to be able to see every single file that's in every single trashcan and choose which ones to keep, move or which ones to delete in one command if possible. Also, I'd like a readout of files being deleted or moved? (I partly know the command for that).
This command takes me to a different user's folder on a different drive and shows me the contents. But, even though I can see them in my users account in the Finder and I can remove one file and then empty the trash, then put the file back in the trash, it would be great to do it in the Terminal, and save a lot of time. I didn't know if the Trash being an invisible directory required something different.
$ cd /Volumes/volumename
mac-pro:volumename admin$ cd ~/.Trash
mac-pro:.Trash admin$ ls -1 | wc -l
0
mac-pro:.Trash admin$ cd ..
mac-pro:~ admin$ cd /volumename/.Trashes/503
mac-pro:503 admin$ ls
File 1 - File 2
Ok, so I see the two files. How do I delete File 1 and move File 2 to my home desktop, but not touch ANYTHING else?
Because I have lots of hard drives, I sometimes need to copy a file from another users trashcan to my desktop, while deleting the other. Btw, all the accounts on this computer are mine.
Thanks!