Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Removing a directory with leading dashes
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
howey
n00b
n00b


Joined: 24 May 2004
Posts: 37
Location: Sydney, Australia.

PostPosted: Mon Mar 07, 2005 1:02 am    Post subject: Removing a directory with leading dashes Reply with quote

Hi
I somehow ended up with a directory called "--help", how to I go about removing it, because rm -rf --help, rm -rf \-\-help and rm -rf "--help/" all give me the help page.
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Mon Mar 07, 2005 1:06 am    Post subject: Reply with quote

End the command with "--" by itself, then give the argument; every GNU program is written to read "--" as "this is the end of the options - here come the arguments."
Code:
rm -rf -- --help

_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
howey
n00b
n00b


Joined: 24 May 2004
Posts: 37
Location: Sydney, Australia.

PostPosted: Mon Mar 07, 2005 1:21 am    Post subject: Reply with quote

I'll keep that in mind for the future, thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum