LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   delete a file that starts if a "-" (minus) sign (https://www.linuxquestions.org/questions/linux-newbie-8/delete-a-file-that-starts-if-a-minus-sign-628108/)

Four 03-14-2008 04:34 PM

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.

acid_kewpie 03-14-2008 04:35 PM

use two dashes... rm -- -r

Four 03-14-2008 04:55 PM

Thanks.

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


All times are GMT -5. The time now is 03:05 PM.