Re: unbelievably stupid mistake - i broke /usr/lib need help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike McCarty wrote:
Robin Laing wrote:

Alastair McKinley wrote:


The first time I used "su -" I ended up wiping out my /root/* directory. I have done it once since as well. Since I really don't use root anymore, it was no loss.

It is so easy to be distracted by someone coming into the office or a kid grabbing onto your leg. :) Or it being 3:30 in the morning when you have to get up at 5:30.


Soooo true. Which is why one should never

(1) log on as root
(2) use aliased commands for root for
    (a) rm
    (b) mv
    (c) etc.
    which have "-f" on them
(3) use sudo for commands like (a)-(c) above,
    (only use sudo for *list* type commands)
(4) hit return before checking, looking away,
    and checking again.


I used to have a really nice list of do's and don't's
for building some wooden musical equipment. One of the
statements went something like this:

"Many of the mistakes in glueing together pieces are
made late at night when one is in a hurry, and does
'one last thing' before going to bed. In the morning,
the glue is set, and no changes can be made. The
solution is don't do the last thing. Go to bed first.
Don't do work when you are tired. It'll be there in
the morning."

Following this advice has saved me a lot of work with
my computers.

Mike

The first thing I usually do is make an aliases for rm, cp and mv to ask for confirmation.

alias rm='rm -i'
alias cp='cp -i --backup=t'
alias mv='mv -i --backup=t'

I wonder if there is a way to disable the "-f" option in rm as root.

I also want to look at the terminal settings and see if I can get the background to change when I su.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux