Re: Removing a file that starts with dashes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, Apr 02, 2014 at 02:05:08PM -0700, benfell@xxxxxxxxxxxxxxxxx wrote:
> On Wed, Apr 02, 2014 at 09:51:41AM -0500, Frank M. Ramaekers wrote:
> > rm: unrecognized option `--backup=numbered'
> > Try `rm ./'--backup=numbered'' to remove the file `--backup=numbered'.
> 
> This is what's worked for me. I know the double dash is supposed to
> stop interpretation of arguments, but it hasn't worked for me.

I do not post solutions unless they work:


tty3 jrd@frodo:/tmp/jrd$ ls -l
total 0
-rw-rw-r--. 1 jrd jrd 0 Apr  2 16:14 --silly-file-name
tty3 jrd@frodo:/tmp/jrd$ rm -- --silly-file-name
rm: remove regular empty file `--silly-file-name'? y
tty3 jrd@frodo:/tmp/jrd$ ls
tty3 jrd@frodo:/tmp/jrd$

What shell are you using?  Perhaps that is interfering.




						John
-- 
The most valuable thing you can make is a mistake - you can't learn
anything from being perfect.

-- Adam Osborne (1939-2003), American entrepreneur

Attachment: pgp7e9noQ7n2l.pgp
Description: PGP signature

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux