Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'A shell function to make 'rm' move files to the trash' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A shell function to make 'rm' move files to the trash
Authored by: gpitts on Feb 29, '08 10:03:27AM

I've used something like this for years, but I call it 'dl' (for delete) so it's never confused with the real rm. Also, I move the files to <Trash>/yyyy-mm-dd-hh-mm-ss/ so I can easily empty the trash of files older than some amount. Over the years this has saved me from near disaster several times. But the last time I had to restore a file I just used time machine...

[ Reply to This | # ]