On Wed, 8 Mar 2000 [EMAIL PROTECTED] wrote:

> 
> the other day i was trying to convert a .ps file to .epsi file. i ran ps2epsi -hand 
>it created a file -h.epsi. now when i attempt to delete it i get an error 
> message. if i `rm -h.epsi` i get a message rm: invalid option -- h Try rm --help
> how do i remove this file or is it there forever?

Most Unix commands that accept command line arguments expect options
to begin with a '-' character. If these options are single characters
they can be concatenated together in a single string preceded by the
'-' character.

    rm -h.epsi

rm thinks you're asking it to remove something with the options
h, ., e, p, s and i. It doesn;t know about those options AND you
haven't given it a file name (that's what it thinks even if YOU think
you know that you have given it a file name).

The trick with dealing with files that begin with a '-' is to prefix
the file name with ./ as in

    rm ./-h.epsi

Now the command will not recognise this as an option and treat it
accordingly.

Some commands can be told to stop processing options with the special
option -- as in

    grep -l -- -w *.pl

which would list the names of the files ending in .pl that contain the
string "-w".

Not all programs follow this convention.

Regards
Peter
----------
Peter Samuel                                [EMAIL PROTECTED]
Technical Consultant                        or at present:
eServ. Pty Ltd                              [EMAIL PROTECTED]
Phone: +61 2 9206 3410                      Fax: +61 2 9281 1301

"If you kill all your unhappy customers, you'll only have happy ones left"

--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to