From owner-freebsd-questions@FreeBSD.ORG Sun Nov 28 12:53:08 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 EBFB716A4CF for ; Sun, 28 Nov 2004 12:53:08 +0000 (GMT) Received: from ptb-relay02.plus.net (ptb-relay02.plus.net [212.159.14.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFDE543D48 for ; Sun, 28 Nov 2004 12:53:08 +0000 (GMT) (envelope-from marko@freebsd.org) Received: from movens.plus.com ([80.229.231.20] helo=[127.0.0.1]) by ptb-relay02.plus.net with esmtp (Exim) id 1CYOY6-000DtT-74; Sun, 28 Nov 2004 12:53:06 +0000 Message-ID: <41A9CB66.1050804@freebsd.org> Date: Sun, 28 Nov 2004 12:58:14 +0000 From: Mark Ovens User-Agent: Mozilla Thunderbird 7.0 (Windows/20041128) X-Accept-Language: en-gb, en-us MIME-Version: 1.0 To: Oliver Fuchs , FreeBSD Questions References: <20041128112146.GA1696@oliverfuchs.onlinehome.de> In-Reply-To: <20041128112146.GA1696@oliverfuchs.onlinehome.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0448-1, 26/11/2004), Outbound message X-Antivirus-Status: Clean 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: Sun, 28 Nov 2004 12:53:09 -0000 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 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 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