deleting illegaly named file

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Fri Jul 16 16:14:20 UTC 2004


On Fri, Jul 16, 2004 at 12:11:41PM -0400, dave morton wrote:
> Somehow a file has been prepended by a  '  -  ' (subtraction sign)
> 
> Bash won't let me delete or move it as the minus sign makes the file illegal
> 
> How do I get around this ? Is there a way to temporarily disable the bash 
> shell or
> add the ' - ' as a wild card?
> 
> I have tried surrounding it with single and double quotes like
> rm -f  "-abc123.bmp", but no luck

Standard methods are:

rm -- filename
rm ./filename

etc.  Anything that tells rm this isn't an option, or that prevents the
- from looking like an option works.

Lenanrt Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list