Question Details

Browse

Delete a file with a "-" as the first character?

By snigel - Mar. 11, 2008

I have a file called -cfg.txt. I think it was created in the gui on a fedora core 4 box. When I try and rename it, I cannot. It keeps treating the - as a parameter, even when I try and do:

> mv \-cfg.txt abc.txt

or

>mv "-cfg.txt" abc.txt

Any ideas on how I can rename and cat this file?


Answers

Add Answer
  1. By an anonymous user on Mar. 11, 2008

    mv ./-cfg.txt abc.txt


    2 Votes
  2. By snigel on Mar. 11, 2008

    Yay!!! Thanks!


    0 Votes
Share your knowledge