rm the un-rm-able file
Stuart Sears
stuart at sjsears.com
Sat Sep 25 21:14:49 UTC 2004
On Thu 23 September 2004 12:41, Ben Yau wrote:
> > On 14:28 22 Sep 2004, James H. Cutts III <jcutts at coin.org> wrote:
> > | Through creative fiddling with my RH 9.0 system, I have managed to
> > | create a file with the name '--exclude=*.work.*' (ticks not included).
> > | I want to delete this file. Any suggestions on the command or on the
> > | Google search? I've tried including the file name in ' (ticks) and
> > | " (quotes). Neither resulted in success.
> >
> > Naturally quotes won't do anything - "rm" never sees them - they exist
> > purely to tell the shell how to interpret strings.
> >
> > Consider your problem: the filename resembles an option. So use a
> > different filename, like "./--exclude=*.work.*", which doesn't start with
> > a dash:
or rename the file first:
[stuart at behemoth stuart]$ rm --exclude
rm: unrecognised option `--exclude'
Try `rm --help' for more information.
[stuart at behemoth stuart]$ rename -- '' *
[stuart at behemoth stuart]$ rm exclude
rename is a very useful tool...
Stuart
--
Stuart Sears RHCE, RHCX
Quidquid latine dictum sit, altum viditur
More information about the redhat-list
mailing list