[Gllug] need help deleting strange filename

Andy Smith andy at lug.org.uk
Mon Aug 6 17:53:26 UTC 2001


On Mon, Aug 06, 2001 at 06:30:39PM +0100, Paul Brazier wrote:
> I'm sure there must be a simple solution to this:
> 
> For some reason I've acquired a file called "--001.avi" or something
> (begins with two hyphens anyway).
> I've tried everything to "rm" it but of course it thinks the double
> hyphen is for a switch to pass to rm.

Couple of choices.

- You can escape the dashes with \ in front of each.

- You can enclose the filename in quotes.

- You can use -- to tell rm there are no more options, i.e. rm --
  --001.avi.

- (my favourite) You can type the first few characters of the
  filename and then use the filename completion facility of your
  shell which should escape the name properly for you (at least bash
  does).

- Use find to select files based on inode and the the -exec option
  to rm them.

> How do I delete it? Can I delete it by inode number or something?

Yep you nearly got it.  Plus at least one of the above methods is
described in a very obscure place that one could never be expected
to look - the man page of rm :-)

-- 
<Matt> i just ordered 500 toilet seats

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list