[GRLUG] RM *

Mike Williams knightperson at zuzax.com
Thu May 17 12:55:43 EDT 2012


A similar story, which fortunately is not repeatable on modern flavors 
of *nix, is this one. I guy needs to wipe a directory, so he types rm * 
or so, but leaves all the hidden files: anything starting with a period. 
So he type rm -rf .* to get rid of them. On Unix of the day, that 
wildcard is evaluated literally and includes .<anything>, including .. 
the parent directory. Which it "descends" into and recursively removes 
everything there, working its way up to the root! Fortunately, modern 
machines assume that if you type rm .* you really mean rm .?* (or 
whatever it is).

On 05/17/2012 12:26 PM, Adam M. Erickson wrote:
> Thanks Casey, I just shared this with a new Linux Admin/DBA I had the
> pleasure of training.
>
> Best regards,
>
> Adam M. Erickson
>
> On Thu, May 17, 2012 at 10:57 AM, Casey DuBois<casey at grlug.org>  wrote:
>> Anyone ever use RM * when they shouldn't have?
>> It's been done:
>> http://www.youtube.com/watch?v=EL_g0tyaIeE&feature=player_embedded
> _______________________________________________
> grlug mailing list
> grlug at grlug.org
> http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug



More information about the grlug mailing list