High Level Question: how to delete file under solaris?? Filename is "-t"

High Level Question: how to delete file under solaris?? Filename is "-t"

Post by pcma » Mon, 11 Nov 2002 15:21:41



Dear all,

I would like to ask, how to delete file under solaris. The filename is "-t"
When I try folling commmand:
$rm -t
The solaris will show following error:

$rm -t
rm: illegal option -- t
usage: rm [-fiRr] file ...

Because the filename is "-t", so I can't to delete it.
Any suggestion??
Thanks!

 
 
 

High Level Question: how to delete file under solaris?? Filename is "-t"

Post by /dev/nul » Mon, 11 Nov 2002 15:35:12


Quote:> Because the filename is "-t", so I can't to delete it.
> Any suggestion??


./-t



TMTOWTDI

 
 
 

High Level Question: how to delete file under solaris?? Filename is "-t"

Post by Rich Tee » Mon, 11 Nov 2002 16:01:31



Quote:> Dear all,

> I would like to ask, how to delete file under solaris. The filename is "-t"

This is a FAQ; please read Casper's excellent Solaris FAQ.

Quote:> When I try folling commmand:
> $rm -t
> The solaris will show following error:

> $rm -t
> rm: illegal option -- t
> usage: rm [-fiRr] file ...

> Because the filename is "-t", so I can't to delete it.

Try rm -- -t

--
Rich Teer

President,
Rite Online Inc.

Voice: +1 (250) 979-1638
URL: http://www.rite-online.net

 
 
 

High Level Question: how to delete file under solaris?? Filename is "-t"

Post by Rich Tee » Mon, 11 Nov 2002 16:02:42


Perfectly legal, granted, but bit of a sledgehammer to
break a walnut! rm -- -t will do just as well...

--
Rich Teer

President,
Rite Online Inc.

Voice: +1 (250) 979-1638
URL: http://www.rite-online.net

 
 
 

High Level Question: how to delete file under solaris?? Filename is "-t"

Post by /dev/nul » Mon, 11 Nov 2002 17:27:54


Quote:> Perfectly legal, granted, but bit of a sledgehammer to
> break a walnut! rm -- -t will do just as well...

Agreed, must lay off the Jolt. :-)
 
 
 

High Level Question: how to delete file under solaris?? Filename is "-t"

Post by r0 » Mon, 11 Nov 2002 20:23:17


Quote:> WHERE do you find the Jolt Cherry nowadays?  The local supermarket
> stopped carrying it, along with the newly renamed Droxies (nee Hydrox)
> cookies.  There must be site that sells over the internet?

most ghetto deli's in the south bronx, new york have them. they even have
have the jolt X2 for 50 cents. you could always try and buy a few big crates
directly from the jolt factory.. if you can track it down. which reminds
me.. this doritos factory in jersey used to throw out all the doritos that
would expire in a week, cause by the time they got shipped anywhere they
would have expired. so we opened up the dumpsters and filled the entire
trunk of our car with bags of doritos, and the back seat to where we could
hardly see out the back window. fun times..  ..just thought id drag this
thread a little more OT :)
 
 
 

High Level Question: how to delete file under solaris?? Filename is "-t"

Post by r0 » Mon, 11 Nov 2002 20:34:08


http://www.thinkgeek.com/caffeine/drinks/2823
 
 
 

High Level Question: how to delete file under solaris?? Filename is "-t"

Post by Chris Thomps » Tue, 12 Nov 2002 08:10:28






>Perfectly legal, granted, but bit of a sledgehammer to
>break a walnut! rm -- -t will do just as well...

It's actually just an elaborately arcane way of generating the
command "rm ./-t", which is even simpler that "rm -- -t", and
a trick that works in more circumstances.

See comp.unix.shell, passim.

Chris Thompson
Email: cet1 [at] cam.ac.uk

 
 
 

High Level Question: how to delete file under solaris?? Filename is "-t"

Post by Chris Morga » Fri, 15 Nov 2002 04:26:25





> Perfectly legal, granted, but bit of a sledgehammer to
> break a walnut! rm -- -t will do just as well...

how verbose :)

how about rm ./-t

as for TMTOWTDI :

Emacs dired mode can delete weird files
bash tab completion will often quote filenames suitably
...
any more?
--
Chris Morgan <cm at mihalis.net>                  http://www.mihalis.net
      Temp sig. - Enquire within

 
 
 

1. deleting "funny filename" files...

In a directory, there is a file by the name of "-c".  (omit quotes)

"rm" always wants to interpret the "-" an argument.  I have tried various
things, to no avail...
%rm \-c
%rm "\-c"
%rm \-\c
   so on and so on...

Seems to me there should be a way to get rid of the file by using the i-node
number....   Can anyone help??

2. Kernels?> Help

3. High level design "chief" seeks "indians"

4. HELP ! Problem getting Ftape to Load

5. QUESTION: how to delete a filename "-z"???

6. mach 64 low resolution

7. Help! I have two cursors in XFree86.

8. GET A CLUE!!! (deleting "-filename")

9. Delete filenames starting with "-"

10. My Security Level is stuck on "high" in RedHat 8.0

11. "T" for "2"