From owner-freebsd-questions@FreeBSD.ORG Tue Nov 30 04:27:26 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C77F16A4CF for ; Tue, 30 Nov 2004 04:27:26 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.176]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FDBD43D46 for ; Tue, 30 Nov 2004 04:27:25 +0000 (GMT) (envelope-from oliverfuchs@onlinehome.de) Received: from [212.227.126.161] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CYzbo-0000iM-00 for freebsd-questions@freebsd.org; Tue, 30 Nov 2004 05:27:24 +0100 Received: from [217.246.205.9] (helo=oliverfuchs.onlinehome.de) (TLSv1:EDH-RSA-DES-CBC3-SHA:168) (Exim 3.35 #1) id 1CYzbl-0006ms-00 for freebsd-questions@freebsd.org; Tue, 30 Nov 2004 05:27:24 +0100 Received: from oliverfuchs.onlinehome.de (oliverfuchs.onlinehome.de [127.0.0.1])iAU4R7D2003562 for ; Tue, 30 Nov 2004 05:27:12 +0100 (CET) (envelope-from oliverfuchs1@oliverfuchs.onlinehome.de) Received: (from oliverfuchs1@localhost)iAU3wGs3003293 for freebsd-questions@freebsd.org; Tue, 30 Nov 2004 04:58:16 +0100 (CET) (envelope-from oliverfuchs1) Date: Tue, 30 Nov 2004 04:58:16 +0100 From: Oliver Fuchs To: FreeBSD Questions Message-ID: <20041130035816.GA2938@oliverfuchs.onlinehome.de> Mail-Followup-To: FreeBSD Questions References: <20041128112146.GA1696@oliverfuchs.onlinehome.de> <41A9CB66.1050804@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <41A9CB66.1050804@freebsd.org> User-Agent: Mutt/1.4.1i X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:c2b2791553508cc938db2bcf18721a3c Subject: Re: what does "rm //" delete? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2004 04:27:26 -0000 On Sun, 28 Nov 2004, Mark Ovens wrote: > Oliver Fuchs wrote: > >Hi, > > > >I had a directory which contained the following: > > > >ls showed me simple this: "?" with 0 bytes > >ls -axl showed me nothing > > > >So I tried to delete the directory but could not succeed with "rm -R" > >because the "directory is not empty". I changed to the directory and tried > >to delete everything inside with "rm *" but also did not succeed. It seemed > >that the file had no name. So than I did a mistake and wanted to delete the > >file with no name with the operation: > > > >rm -R // > > > >This was a big mistake which I noticed soon enough (some files in /bin were > >deleted). I could repair the damage but what I want to know is what exactly > >is > > > >rm -R // > > > >deleting. It seems that it is deleting everything? > > > > It is, you're recursively deleting / - multiple '/' are treated as one; try > > cd //usr//bin Yes, it was a hurtful expirience but now I know that rm // is the same as rm / > > To delete the rogue file try > > rm -i * > > in the directory the file is in, answering 'n' for all other files. > > If that fails, try copying everything you need in the directory it is in > to somewhere else then recursively deleting the directory > > rm -rf /path/to/dir/with/rogue/file Tried it but had no chance. In any case I had to formate that drive new so I finally made it to disappear. This was a confisung day in the life of my FreeBSD system. So thank you again for helping and answering. Oliver > > HTH > > Mark > > >Thanx in advance > > > >Oliver > > > > > > --- > avast! Antivirus: Outbound message clean. > Virus Database (VPS): 0448-1, 26/11/2004 > Tested on: 28/11/2004 12:58:15 > avast! - copyright (c) 2000-2004 ALWIL Software. > http://www.avast.com > > -- ... don't touch the bang bang fruit