rm to move files to trash is like weed. It is common and pleasuring but can be bad for you in the future. ;)
You really need control yourself when using
Don't use rm
Imagine, you get used to rm moving to trash and make a habit of it. Sure, your system is safe but when you log into a friend's (or your wife's or your boss') notebook and have to delete something? You'll be actually using the real
rm - deleting those files forever. It's a bad habit, and you need to know that.
So instead, install
rmtrash and make a habit of using it:
# install rmtrash, (either from the macports or by the brew.)
$ alias trash="rmtrash"
$ alias del="rmtrash" # del / trash are shorter than rmtrash
Correcting bad habits
Another thing you can do to force yourself to use
rmtrash instead of
rm is alias it to a custom message in your
alias rm="echo Use 'del', or the full path i.e. '/bin/rm'"
So, whenever you use
rm, you'll be prompted to either use
/bin/rm. Remember, this is only temporary, after a while you should remove the alias.
Never ever, do something like this:
$ cd /tnp; rm -rf *
sh: cd: /tnp: No such file or directory
Pop Quiz: In what directory will the
rmcommand run? :)
Ps: Just removed some unwanted edits to this post, what added some nonsenses about the aliases.