[ale] help with rm (yes, I'm embarrassed about this)

Tejus Parikh tejus at vijedi.net
Thu Nov 25 12:53:44 EST 2004


Something that I find helps to avoid major mishaps is having a file
named "-i" in all important directories (ie ones that you don't
completely clean out that often). I have it in /home and / along with a
few other choice places.  Creating such a file is as simple as "touch --
-i"  

It's not 100% foolproof, rm -rf -- * will still screw you over, but it
will save you from the accidental late night, low coffee, or high BAC
mistake.


On Wed, 2004-11-24 at 09:15, Nathan J. Underwood wrote:
> Ok, too early in the morning, and little coffee has been ingested (and 
> it's really close to a long weekend).  Anyway, here's the deal.  I have 
> a server that houses all of it's data in /home.  There's a subdirectory 
> (/home/backups) that had a backup of all of the stuff that was in /home 
> (all of the data) that I needed to empty (not delete the directory, just 
> empty it out).  Generally, I'll cd into that directory and do an rm -rf 
> *, which works really well.  Since the process is a once-in-a-blue-moon 
> thing, I've not bothered scripting or automating it.  At any rate, I had 
> to do it this morning.  Unfortunately for me, I was in /home, rather 
> than in /home/backup.  I very quickly realized what I'd done (about 2 
> seconds), but had already started the command.  So, here's the quandry. 
>   I know *some stuff* must have been deleted.  I'm hoping that it starts 
> deleting at 0 and progresses to z.  If that's the case, it would have 
> started in the /home/backups directory, in which case I have nothing to 
> worry about (i.e. nothing outside of /home/backups would have been 
> bothered).  Can anyone confirm / debunk this, or tell me where to look 
> it up?  Thanks.
> 
> \/-- insert flames here --\/
-- 
Tejus Parikh
tejus at vijedi.net



More information about the Ale mailing list