Re: scripting question
Bill Moseley said:
> The one I did yesterday (and have done before which breaks the ONCE rule)
> is rm -rf foo * where I meant rm -rf foo* (foo was a tarball that I
> unpacked so I did have two foo* to remove. At least this time it was not
> in a top-level directory.
yes I've done that one too :) about 4-5 years ago, nuked all my email
in my home dir(that was the only thing I cared about). these days
I use cyrus so mail is not accessable to my normal account and is
stored in a very different location /var/spool/cyrus/mail/user/ so
I'm a bit safer.. I still use rm -rf * on a regular basis though, if
it happens again I can restore from backup if the files are important.
a bigger headache was when I did chown -R root.root /root/* and a
couple of find commands to chmod all files to 400 and all directories
to 700, only to find the system hosed a couple minutes later, turns
out someone had put a symlink in /root that pointed to /, so every
file on the system was changed. luckily the system wasn't THAT important
as nobody noticed the problem for about a week or 2. then they reinstalled,
I spent about 4 hours trying to fix as much as I could but there was
just too much damage.