> On Wed, Sep 7, 2011 at 1:00 PM, Bob Proulx <b...@proulx.com> wrote: > > jacques wrote: > >> by error most of the binaries in /usr are erased (killing rm :-( > > > > Everyone has made that mistake at some point. I know I have! > > Not me! Though I did chmod -R /usr once. I noticed it immediately > and cancelled. Most of the commands were broken, though luckily tar > and scp still worked, so I copied over a backup and untarred it. This > anecdote is brought up whenever anyone suggests skipping /usr /bin in > backups is a good idea because the data doesn't change and would be > recovered by OS reinstall anyway (yes I've heard that argument). > > Which brings me to another fun question. What's your worst > administration mistake and how did you recover?
I once tried to change the ownership of all the files in a user directory by doing something like "chown -R <newuser> .*" from within the directory -- I've forgotten what exactly I typed, but my motive was to get all the "." files included in the scope of the command. Unfortunately, ".*" includes "..", so the chown command hopped up to /home, and started switching the whole file system over to be owned by the new user. I caught it after it was taking a suspiciously long time, and after a minute or two, I figured out what had happened. Nothing focusses the mind quite like screwing up a live server. After a brief but intense look at the man-page, I figured out that what I wanted was "chown -hR <newuser> <path/to/target>", and did that for both my initial task, and to fix the user directories that had been messed up. These days, I almost always use verbose options of commands, if they exist, so I can verify that they're operating in the expected scope. -- A. -- Andrew Reid / rei...@bellatlantic.net -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/201109131925.28318.rei...@bellatlantic.net