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: hypert on Feb 29, '08 09:08:04AM
If you're using csh or tsch, add this to your .cshrc or .tcshrc file:
alias rm '\mv \!* ~/.Trash'
Feel free to call the alias "rmm" or something else that suits you. I understand the argument for doing that, but I'm too lazy to remember a million ways to call the same thing. I have an "ll" alias for "ls -l", and it's one of the WORST things, as I type "ll" all the time, even on accounts/computers. I'd rather have my alias do something instead of having me to have to re-type commands over and over. Even for "rm", as I do not accidentally delete someone else's Desktop very often...

[ Reply to This | # ]