commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Replace rm, a neat shortcut, with a less permanent method of removal.
Note may require you to install the trash client; "sudo apt-get -y install trash-cli"
Sometimes in a hurry you may move or copy a file using an already existent file name. If you aliased the cp and mv command with the -i option you are prompted for a confirmation before overwriting but if your aliases aren't there you will loose the target file!
The -b option will force the mv command to check if the destination file already exists and if it is already there a backup copy with an ending ~ is created.
avoid rm to be recursive until you complete the command: put the -rf at the end!