Tuesday, March 24, 2009

saving your rm -rf ass

If you are still getting used to the rm command, it can be useful to add the following line to your ~/.bashrc file using your favorite text editor, and then log out and log back in. Then, any time you type rm, the bash shell will convert it automatically to an rm -i command. That way, rm will always work in interactive mode:

Code Listing 4.12: Setting the 'rm -i' alias

alias rm="rm -i"

No comments: