Re: [Hampshire] how do I delete a file named -n

Top Page

Reply to this message
Author: Will Davies
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] how do I delete a file named -n
>
>
> http://www.google.co.uk/search?hl=en&q=remove+file+starts+with+hyphen&btnI
>

[donut@donkey ~]$ 
http://www.google.co.uk/search?hl=en&q=remove+file+starts+with+hyphen&btnI
[1] 6105
[2] 6106
http://www.google.co.uk/search?hl=en: No match.
btnI: Command not found.
q=remove+file+starts+with+hyphen: Command not found.
[1]  - Exit 1                        http://www.google.co.uk/search?hl=en
[donut@donkey ~]$
[2]    Exit 1                        q=remove+file+starts+with+hyphen
[donut@donkey ~]$ ls
-n
[donut@donkey ~]$


Nope that didn't do it.

I must confess on this occasion I forgot to google so I appologise and
thanks for reminding me. I suppose the interesting thing about asking a
group of real people is the diversity in the answers you receive. This
also helps in building background knowledge. Using google I probably
would have found the first working solution and stopped. This way as
well as the suggestion to include the path first I also learnt that --
ends the command options.

So thank you very much to all of you for your suggestions. BTW rm ?n
does not work for me.

Will Davies
http://www.ecs.soton.ac.uk/~wmd04r