How to wear Linux sneakers and not shoot yourself in the foot

Date July 29, 2006 by Isaac

I love most things about the great and powerful Linux; however, there are some things that will get you into some serious trouble. File recover in Linux is non-trivial, so it's best to not delete something unless you are sure you want it. Unfortunately, it's very easy to type 'rm * .tmp' instead of 'rm *.tmp'. So, edit your .bashrc file and add the following lines:

alias rm='rm -i'alias cp='cp -i'alias mv='mv -i'set -o noclobber

The first three lines enable "interactive" mode, where you will be prompted on whether or not you really want to delete or overwrite a file. The last line protects you against I/O redirects that would overwrite a file.

On a side note, why doesn't someone sell a Linux branded sneaker?

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>