[HOWTO] Selectively delete items in the trash

gatorparrots

~departed~
Issue this command to selectively empty the trash:
rm "/Users/yourusername/.Trash/nameoffiletodelete"
(Change rm to rm -rf if you want to delete a folder instead of a single file.)

If you want, you could add an alias to your .*shrc file that would allow you to specify the filename without typing the full path:
alias trash 'rm -rf /Users/yourusername/.Trash/\!:1'

So if you have a file called reallybigtiff.tiff in the trash, you could just type:
trash reallybigtiff.tiff
hit enter or return and it will delete the specified file for you.

If you desire more robust functionality, something modeled after testuser's script in this thread is possible: http://www.macfora.com/forums/showthread.php?s=&threadid=6408
 
Back
Top