Check out this near miss

Bill Campbell linux-sxs
Thu May 10 09:59:12 PDT 2007


On Thu, May 10, 2007, David Bandel wrote:
>On 5/10/07, Man-wai Chang <mwchang at i-cable.com> wrote:
>> James McDonald wrote:
>> > I was trying to delete old files in the PDF dir but I missed the dot.
>> >
>> > Thank goodness I wasn't logged in as root.
>> >
...
>> ALWAYS alias rm=`rm -i` in /etc/bashrc or /etc/profile.
>
>What horrid advice.  Baby Sysadmins that grow up _expecting_ this
>alias to always be there are the ones who destroy entire file systems
>when it's not.
>
>NEVER depend on aliases like the above.  They're the first things I
>unalias on a RedCrap system.

I've seen people recommend putting a file named ``-i'' in each
directory so the ``rm'' command sees that first.  Of course
somebody feeling nasty could just create one named ``-fr'' which
sorts before ``-i'' :-).

Bill
--
INTERNET:   bill at Celestial.COM  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

No man's life, liberty, or property are safe while the legislature is in
session. -- Mark Twain



More information about the Linux-users mailing list