Re: Deleting file beginning with '-' using rm

From: Creature (ajp7_at_kent.ac.uk)
Date: 09/14/04


Date: Tue, 14 Sep 2004 09:49:24 +0000 (UTC)

On 14 Sep 2004 00:57:41 -0700, TiN wrote:
> I accidentally created a file beginning with a '-' using gcc by
> typing:
> gcc -o -Wall prog1.c
>
> I tried deleting it using 'rm', but to no means was I successful.

You needed to do 'rm ./-Wall':

[alex@bubonis alex]$ echo "foo" > -foo
[alex@bubonis alex]$ ls | grep foo
-foo
[alex@bubonis alex]$ rm ./-foo
[alex@bubonis alex]$ ls | grep foo
[alex@bubonis alex]$

Voila!

-- 
Alex Pounds (Creature)                  .~.       http://www.kentunion.co.uk/
CS Student                              /V\     
                                       // \\
"Variables won't; Constants aren't"   /(   )\
                                       ^`~'^


Relevant Pages

  • RE: Help with Delete Button
    ... "Alex" wrote: ... Are you actually deleting a record in the form's record source or a record ... On Error GoTo DelCurrentRec_Error ... Set rst = Nothing ...
    (microsoft.public.access.formscoding)
  • Re: Another Understanding Pointers Question
    ... "Alex" writes: ... >> typing, which is insignificant. ... a variant of the GNU operating system. ...
    (comp.lang.c)
  • I am loyal but..
    ... Just by typing something into the editor ---> crash. ... Alex ...
    (borland.public.delphi.non-technical)
  • Re: Another Understanding Pointers Question
    ... "Alex" wrote: ... >> typing, which is insignificant. ... Richard ...
    (comp.lang.c)
  • Re: not responding
    ... Alex wrote: ... "Try deleting ALL the files in the \document and ... CS2 Settings folder" ...
    (alt.graphics.photoshop)