On Mon, 27 Sep 2010, Greg Wooledge wrote:

On Mon, Sep 27, 2010 at 06:39:56PM +0200, Christopher Roy Bratusek wrote:
It's a bad idea to alias rm. It would be better to use your xrm
directly. If you alias rm and get in the habit of it protecting you,
one of these days the alias won't be there and OOPS, gone!

Well... I know what you mean, but I'm using GNU/Linux for seven years now, it's 
now
almost impossible to learn to use `xrm' instead of `rm'. Besides, it won't 
disappear
somewhen, it's hardcoded (and bound to other stuff, which I know whether it 
exists or
not).

You might reinstall your OS one day, either due to hardware failure or
simply upgrading.  Then you might forget to build the rm alias.

Or you might get a job working on Unix systems.  The systems at work will
not have your rm alias.

Or you might be on a friend's computer....  You get the idea, I hope.

   Or you might put it in a script, expecting to be prompted, and lose
   files you need. Aliases are not expanded in a script.

--
   Chris F.A. Johnson, <http://cfajohnson.com>
   Author:
   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)

Reply via email to