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

Top Page

Reply to this message
Author: Simon Reap
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] how do I delete a file named -n
On 31/01/07 15:00, Andy said the following:
> On 31/01/07, Will Davies <wmd04r@???> wrote:
>> I have managed to create a file named "-n" without the quotes. Any clues
>> on how to delete it from the command line?
>
> Have you tried:
> rm ./-n

Or

rm nosuch_file -n

'rm' is one of the many commands which, as soon as it sees something on
the command line that isn't an option, assumes that the rest of the line
contains file names. This will complain about not finding nosuch_file
(assuming that it doesn't exist!), but it will still go on to delete the
'-n' file.

Simon



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.