>> Write the command exactly as you would with the rm, but use ls instead. 
>> Verify
>> that what you see is what you want to be delete. Use your command line 
>> history
>> (set -o vi, set -o emacs etc...), recall that command and substitute ls with
>> rm. Even if you delete with a find command, do it first with ls, output to a
>> file, verify.
> One sysadmin I worked with told me that whenever I was going to delete a
> line in MySQL I should first type 'limit 1' and a bunch of garbage
> followed by a semi-colon:
>
> limit 1 asdklvf;
>
> Then prepend to that the delete I intended to do, just in case I
> accidentally hit enter at the wrong time.
>
> Struck me as a little bit of overkill!
>

When I'm writing a more complex rm or sql delete, I'll often put some
junk at the beginning of the command.  I've accidentally hit return
early too many times to count.

I also do the ls before rm and select before delete tests too.

The worst I've done is
1) Backup AS400 ERP data after hours
2) Did a bunch of work that didn't work out
3) Restored and went home

The problem was I restored the wrong date from the backup.  Could have
been easily fixable when people noticed the next morning, but I left
the good tape in the drive and the midnight backup overwrote it.

Lost 24 hours of everything.

I'm pretty paranoid about verifying backups and restores theses days :-)
_______________________________________________
Discuss mailing list
Discuss@lists.lopsa.org
https://lists.lopsa.org/cgi-bin/mailman/listinfo/discuss
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to