[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rm -rf .* alternatives (was: Re: I broke gnome2 *snff*)



On Sun, 26 Oct 2003 14:10:01 +0000
"Karsten M. Self" <kmself@ix.netcom.com> wrote:

> on Fri, Oct 24, 2003 at 03:28:36PM +0100, Colin Watson
> (cjwatson@debian.org) wrote:
> > On Fri, Oct 24, 2003 at 11:36:25PM +0930, David Purton wrote:
> 
> > > Sadly no, I neglected to say that I could not get things to work
> > > even using a test account and doing an rm -rf .* in $HOME.
> > 
> > Just in case other people try this, 'rm -rf .*' is VERY DANGEROUS.
> > '.*' expands to include '.' and '..', and if you happen to have
> > privileges to write to the parent directory then you'll end up
> > removing all directories *next* to your current directory as well!
> 
> So what do folks do?
> 
>     rm -rf .?*          # will expand to include ..

  .??*

has always been a sufficient approximation for me and easy to type (I
say approximation because it won't match things like .a)

-g

Attachment: pgpJi6Vr5H6Cg.pgp
Description: PGP signature


Reply to: