Re: deleting files with odd names
- From: Eric <wolleric@xxxxxx>
- Date: Wed, 25 Jul 2007 17:34:46 -0000
On 25 Jul., 19:20, ld50...@xxxxxxxxx wrote:
Somehow, I have acquired a couple of files whose names start with "-",
and I can't delete them, at least not with the usual "\" escape
character. For example, one file is called "-h.gif" and when I try to
delete it I see:
rm '-h.gif'
rm: invalid option -- h
rm '\-h.gif'
rm: cannot lstat `\\-h.gif': No such file or directory
What's the correct escape character for this?
Thanks,
Joe
Hmm, '-' should be char 0x2D, try escape sequence \055 (octal). How
about double quotes? Maybe that helps. Or just use "rm ?h.gif", if
that doesn't match any other names.
Regards,
Eric
.
- References:
- deleting files with odd names
- From: ld50 . 30
- deleting files with odd names
- Prev by Date: Re: deleting files with odd names
- Next by Date: Re: deleting files with odd names
- Previous by thread: Re: deleting files with odd names
- Next by thread: Re: deleting files with odd names
- Index(es):
Relevant Pages
|