Subject: Re: rm-ing a file with a bad name
To: Joe Laffey <joe@laffeycomputer.com>
From: Dr. Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 10/19/1998 10:48:24
On Sun, 18 Oct 1998, Joe Laffey wrote:

> I tried to untar a zipped archive and ended up creatinga file with a real
> long weird name.
> 
> How can I delete this file?

Uhm, rm. :-)

There are only two real problems you might encounter. If the file name
starts with a "-", you need to use the -- option to rm before the file 
name (to tell it that things starting with a "-" are file names, not more
options).

The other thing is if the name has spaces or quotes in it. If you use a
shell which does file name completion, like tcsh, just type enough of the
name to make it unique, and then hit tab or whatever to complete the name.
The shell should stick in the escape characters for you.

If not, just prefix " ", "'", '"', and "\" with "\" (== "\ ", "\'", '\"',
"\\") and thing should be fine.

If there are no other files in the directory you want, rm * works too.

Take care,

Bill