on Mon, Oct 21, 2002, Russell (rjshaw@iprimus.com.au) wrote: > dave mallery wrote: > > > > hi list! > > > > there's a saying that all people are in two groups: > > > > those who have done an rm -R * in root > > and those who have not done it yet. > > > > last evening, i joined the former group after six years of linux and a > > lifetime of computing... > > It takes a bit of conditioning of your habits to avoid these kinds of > errors. I've never been locked out of my car because i *know* that it > would happen if i didn't always lock the door with the key. > > Likewise, when doing a recursive delete of directories as root, always > do "pwd" or "ls -al" if your path isn't displayed in the prompt. > Another way is to do the delete from midnight commander where you can > see everything. There are a number of other ways to avoid this pitfall. - I've done rm -rf * from /. I didn't do much harm, as I'd mounted all but one partition read-only, and was booted into an initrd image. Bought myself a reboot, but no problems otherwise. That incident inspired a response to someone who asked if GNU/Linux had any tools or mechanisms to keep users from doing really stupid things to themselves. "Yes", I replied, "Bitter experience". - I'll frequently first chown a tree to a nonprivileged user, then delete files as that user. - I'll move files to another tree, then delete that (often as another user). - I'll look at the command before I run it. Several times. - I'll generate a script listing the files to be delted. Look at it several times. And then run it. - When performing major system surgery, I have *two* sets of backups -- generally one local, and one off-system (either tape or network, depending on circumstances). Generally: be vewwy vewwy caweful as woot. Back up anything critical first. And have a recovery path. This doesn't have to be a full-fledged plan, but it should be at least an idea of what you're going to do if/when things go wrong. Peace. -- Karsten M. Self <kmself@ix.netcom.com> http://kmself.home.netcom.com/ What Part of "Gestalt" don't you understand? ARM Computer: Customer Service Hell On Earth http://lists.svlug.org/pipermail/svlug/2001-November/038616.html
Attachment:
pgpX4r5SLN7Ny.pgp
Description: PGP signature