[conspire] You gotta love a good straight line

Rick Moen rick at linuxmafia.com
Tue Jul 12 18:12:36 PDT 2005





 From: tim at birdsnest.maths.tcd.ie
 To: ilug at linux.ie
 Subject: Re: [ILUG] How to delete -1234 ?
 User-Agent: KMail/1.8.1
 Date: Tue Jul 12 18:59:09 IST 2005

How do I delete this file called "-1234" ?

-- 
Timothy Murphy  
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland







 From: rick at linuxmafia.com
 Date: Tue, 12 Jul 2005 14:35:25 -0700
 To: ilug at linux.ie
 Subject: Re: [ILUG] How to delete -1234 ?
 X-Mas: Bah humbug.
 User-Agent: Mutt/1.5.6+20040907i

Quoting Timothy Murphy (tim at birdsnest.maths.tcd.ie):

> How do I delete this file called "-1234" ?

UNIX FAQ question 2.1:

2.1)  How do I remove a file whose name begins with a "-" ?

      Figure out some way to name the file so that it doesn't begin
      with a dash.  The simplest answer is to use

            rm ./-filename

      (assuming "-filename" is in the current directory, of course.)
      This method of avoiding the interpretation of the "-" works with
      other commands too.

      Many commands, particularly those that have been written to use
      the "getopt(3)" argument parsing routine, accept a "--" argument
      which means "this is the last option, anything after this is not
      an option", so your version of rm might handle "rm -- -filename".
      Some versions of rm that don't use getopt() treat a single "-"
      in the same way, so you can also try "rm - -filename".

http://www.faqs.org/faqs/unix-faq/faq/part2/section-1.html





 From: Timothy Murphy <tim at birdsnest.maths.tcd.ie>
 To: ilug at linux.ie
 Date: Wed, 13 Jul 2005 01:59:14 +0100
 User-Agent: KMail/1.8.1
 Subject: Re: [ILUG] How to delete -1234 ?

On Tue 12 Jul 2005 22:35, Rick Moen wrote:

> > How do I delete this file, called "-1234" ?

>       Figure out some way to name the file so that it doesn't begin
>       with a dash.  The simplest answer is to use
>
>             rm ./-filename

Thank you.
Is there anything you don't know?
=================================
[tim at william ~]$ rm ./-2005*
[tim at william ~]$ ls ./-2005*
ls:  ./-2005*: No such file or directory
=================================

-- 
Timothy Murphy  
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland




 Date: Tue, 12 Jul 2005 18:03:37 -0700
 To: ilug at linux.ie
 X-Mas: Bah humbug.
 User-Agent: Mutt/1.5.6+20040907i
 From: Rick Moen <rick at linuxmafia.com>
 Subject: Re: [ILUG] How to delete -1234 ?

Quoting Timothy Murphy (tim at birdsnest.maths.tcd.ie):

> Thank you.
> Is there anything you don't know?

ObVious:  I'm not sure.  ;->







More information about the conspire mailing list