Re: delete ~ directory

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

 



Am Mo, den 19.04.2004 schrieb Vano Beridze um 09:17:

> Hello
> 
> I've accidentally (from a java program) created a directory named ~ in
> my home directory.
> Because ~ is a synonim for a home directory how can I delete this 
> directory safely?
> I mean I don't want to delete my whole home directory just that wierd
one.
> 
> Thank you
> Vano

Besides the other suggestions, as a general annotation too, on bash you
can use

command -- special_sign_name

The leading "--" tells the shell that the following is no options set.
So in your case it would be while you are in the directory where the
miscreated directory is placed

rm -rf -- ~

You can use this too if you accidentally created i.e. a file named "-f" 

rm -f    will not work, but
rm -- -f will do.

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 16:51:48 up 23:37, 10 users, 0.05, 0.15, 0.16 
                   [ ÎÎÏÎÎ Ï'ÎÏÏÎÎ - gnothi seauton ]
             my life is a planetarium - and you are the stars



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux