Re: OT: the rm bug hit me again



On Fri, 2006-10-27 at 14:41 +0100, Nigel Wade wrote:
Mike McCarty wrote:
Arthur Pemberton wrote:
On 10/25/06, Robin Laing <Robin.Laing@xxxxxxxxxxxxxxx> wrote:

Graphical file manager? That isn't the *nix way of doing things. :)

And the -f in the rm command it to stop the "Confirm delete?" questions.
My rm is set to confirm all deletes using alias.

--


How exactly did you do this? I got bit by this bug once in my Linux
life, would prefer it never happens again.


alias rm='rm -i'


That's not a good idea as it teaches you to expect to be prompted, and you'll be
bitten badly some time when the alias isn't present.

Strange that you feel this is wrong.

Fedora has from the beginning done exactly that for the root user, and
the reason is to help prevent those type human errors when you are root
and have the power of god to destroy your system.

For me, I never run as root unless absolutely necessary, and I always
preview my commands before I hit enter.

I personally like the prompt because it reminds me that I am running as
root.

Better to alias it to some command which doesn't exist, like del, and train
yourself to use del. If the alias isn't present all you get is 'del: command not
found' rather than a depleted filesystem.

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@xxxxxxxxxxxx
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555


--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • Re: Backup/Copy tree with alias file
    ... So what does this SEARCH command give us? ... sys$specific 'root ... above and then add the alias to give it something to look for. ... one shouldn't manually delete a system directory tree ...
    (comp.os.vms)
  • Re: OT: the rm bug hit me again
    ... And the -f in the rm command it to stop the "Confirm delete?" ... My rm is set to confirm all deletes using alias. ... the reason is to help prevent those type human errors when you are root ... I personally like the prompt because it reminds me that I am running as ...
    (Fedora)
  • Re: roots aliases
    ... >> When I'm in root, the command, 'alias', gives me a different output than ... Can I modify the root aliases? ...
    (alt.os.linux.suse)
  • Re: Def alias error in RACF
    ... to define an Alias in a RACF environment with z/OS V1.7 release? ... At the moment to send the request in command line (through the RACF ... Actually, that's a TSO command, not a RACF command. ...
    (bit.listserv.ibm-main)
  • Re: OT: the rm bug hit me again
    ... And the -f in the rm command it to stop the "Confirm delete?" ... That's not a good idea as it teaches you to expect to be prompted, and you'll be bitten badly some time when the alias isn't present. ... the reason is to help prevent those type human errors when you are root ... A user who expects rm to prompt will only delete their own files if it doesn't, a root user who expects rm to prompt can delete the entire system if it doesn't. ...
    (Fedora)