*BSD News Article 24204


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!cs.utexas.edu!uunet!math.fu-berlin.de!uni-paderborn.de!urmel.informatik.rwth-aachen.de!news.rhrz.uni-bonn.de!saph2.physik.uni-bonn.de!juengst
From: juengst@saph2.physik.uni-bonn.de (Henry G. Juengst)
Newsgroups: comp.os.386bsd.questions
Subject: Re: How do you rm a strange file?
Date: 19 Nov 1993 11:00:50 GMT
Organization: Physikalisches Institut der Universitaet Bonn
Lines: 40
Distribution: world
Message-ID: <2ci912$o5p@news.rhrz.uni-bonn.de>
References: <2ch6t2$ih5@netbsd08.dn.itg.telecom.com.au>
Reply-To: juengst@saph2.physik.uni-bonn.de
NNTP-Posting-Host: saph1.physik.uni-bonn.de


In article <2ch6t2$ih5@netbsd08.dn.itg.telecom.com.au>, tdwyer@netbsd08.dn.itg.telecom.com.au (Terry Dwyer 619 491 5161) writes:
> seem to have created a file that I can't delete in the middle of 
>a large directory structure:
>
>-rw-r--r--    1 tdwyer         58 Nov 19 08:54 -lg | less
>
>Any clues how to rm it?

rm -f './-lg | less'

If you want to do it carefully then

mkdir gibsdemelch       #or another name for a temporary directory
mv './-lg | less' gibsdemelch
ls -lag gibsdemelch     #let's have a look
rm -rf gibsdemelch      #if the previous  ls  showed what you've expected

You can also use wildcards

mv ./*less* hauwegdenmist

The trick is the  ./  at the beginning.

>
>-- 
>   _-_|\    Terry Dwyer 	  E-Mail: tdwyer@netbsd08.dn.itg.telecom.com.au
>  /     \   System Administrator  Phone: +61 9 491 5161     Fax: +61 9 221 2631
>  *_.^\_/   Telecom Australia     Telstra Corporation       MIME capable mailer
>       v    Perth  WA                 ( I do not speak for Telstra or Telecom )
>

Henry

--
juengst@saph2.physik.uni-bonn.de   [131.220.221.12]  (internet)
juengst@boss1.physik.uni-bonn.de   [131.220.221.30]
saph2::juengst                     [13.259]          (decnet)

Any opinions in this mail are my own.