LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-14-2008, 04:34 PM   #1
Four
Member
 
Registered: Aug 2005
Posts: 298

Rep: Reputation: 30
delete a file that starts if a "-" (minus) sign


Hi.

accidently I created a file called "-r" now how do I delete it? I also have one called "-L" and "-m". And I just can't delete them because

rm -r

say's that there are no parameters. Which makes sense so what if "-r" is a filename and not an option.

Thank you.
 
Old 03-14-2008, 04:35 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
use two dashes... rm -- -r
 
Old 03-14-2008, 04:55 PM   #3
Four
Member
 
Registered: Aug 2005
Posts: 298

Original Poster
Rep: Reputation: 30
Thanks.

I think I posted alittle to soon its explained in the man pages. I haven't noticed it there until you have posted.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
15.How would you create and then delete a file called "$SHELL"? KumARan23 Linux - Newbie 9 11-11-2007 09:02 AM
"Wine" starts loading... then quits... Can't install ".exe" jabber32 Linux - Software 1 01-10-2007 06:06 AM
what to do if you delete "title" from the grub.conf file? Pravab Linux - Kernel 3 05-11-2006 09:59 AM
how to delete file which name start with minus sign? guillaume31 Linux - General 3 01-27-2005 07:15 AM
oops - made a file called "--dereference" - how do I delete it? BrianK Linux - General 2 06-21-2004 08:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration