delete ~ directory

Alexander Dalloz alexander.dalloz at uni-bielefeld.de
Mon Apr 19 16:37:20 UTC 2004


Am Mo, den 19.04.2004 schrieb Alexander Dalloz um 17:14:

> Am Mo, den 19.04.2004 schrieb Martin Stone um 17:09:
> 
> > No.  "rm -rf -- ~" absolutely WILL expand the ~ and remove your home directory! 
> >   The expansion of "~" is done by bash, not the rm command.  The -- only tells 
> > rm not to treat what follows as an option; it does not tell bash not to expand 
> > "~".  I would hope that you would test before posting such inaccurate and 
> > dangerous advice.
> 
> Hm, sorry! I will urgently test the case. Thank you for the response.
> 
> Alexander

Ok, thanks to the urgent warning by Martin Stone I rechecked my hint and
am willing to cancel it hereby! Feels like a brain bug ;) *awkward*

Of course the usage of "--" will not stop the bash expanding. It only is
useful in conjunction with the other cases I mentioned too (accidentally
created file/directory called "-f" for instance).

Alexander


-- 
Alexander Dalloz | Enger, Germany | GPG key 1024D/ED695653 1999-07-13
Fedora GNU/Linux Core 1 (Yarrow) on Athlon CPU kernel 2.4.22-1.2179.nptl
Sirendipity 18:32:28 up 1 day, 1:18, load average: 0.45, 0.45, 0.31 
                   [ Γνωθι σ'αυτον - gnothi seauton ]
             my life is a planetarium - and you are the stars
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20040419/79fe503c/attachment-0001.sig>


More information about the fedora-list mailing list