Re: Deleting file beginning with '-' using rm
From: Creature (ajp7_at_kent.ac.uk)
Date: 09/14/04
- Next message: Ayaz Ahmed Khan: "Re: Linux distro for old laptop"
- Previous message: Harold Stevens: "Re: Linux distro for old laptop"
- In reply to: TiN: "Deleting file beginning with '-' using rm"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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" /( )\ ^`~'^
- Next message: Ayaz Ahmed Khan: "Re: Linux distro for old laptop"
- Previous message: Harold Stevens: "Re: Linux distro for old laptop"
- In reply to: TiN: "Deleting file beginning with '-' using rm"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|