baslinux AT lists.ibiblio.org
Subject: Baslinux mailing list
List archive
- From: ruohtula AT netscape.net (Erkki Ruohtula)
- To: baslinux AT lists.ibiblio.org
- Subject: [BL] Re: helpful alias - Not
- Date: Mon, 27 Oct 2003 03:19:32 -0500
James Miller wrote:
> like a really helpful alias for a much used Linux system command - rm. It
> links rm to rm -i , which asks the user for confirmation before deleting
> any file with the rm command. To set up the alias on your system do
> -----------------
> alias rm='rm -i'
> -----------------
> After you do this, any time you issue "rm fileuwannadelete.txt" you get a
> response from the system "rm: remove 'fileuwannadelete.txt'?" Press
> "n" or "y" keys accordingly.
As a long-time Unix and Linux user I must object.
This commonly seen "helpful" redefinition of "rm" is one of
those things in life that initially looks like a good idea,
but in reality creates worse problems than it solves.
The chief problem is that if you get into the
habit of using "rm" on a lot of files, relying on
it asking for confirmation, and then use someone elses
Linux or Unix system where it has the original behaviour,
you are sunk.
It is also a bother when you really want to get
rid of lots of files.
Creating a safer file deletion command is fine, but under
no circumstances call it "rm". Instead give it a different
name, like "del" or "erase".
In general, redefining _any_ standard POSIX command
to have nonstandard behaviour is a very bad idea,
except in those cases when the new behaviour is
clearly a backward-compatible extension, like a
completely new option.
Erkki
__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
Get AOL Instant Messenger 5.1 free of charge. Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
-
[BL] Re: helpful alias - Not,
Erkki Ruohtula, 10/27/2003
-
Re: [BL] Re: helpful alias - Not,
qwms-avib, 10/27/2003
- Re: [BL] Re: helpful alias - Not, daybrown, 10/27/2003
-
Re: [BL] Re: helpful alias - Not,
qwms-avib, 10/27/2003
Archive powered by MHonArc 2.6.24.