From owner-freebsd-questions@FreeBSD.ORG Sun Mar 3 03:25:07 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D7E56D4 for ; Sun, 3 Mar 2013 03:25:07 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 93CC511B for ; Sun, 3 Mar 2013 03:25:07 +0000 (UTC) Received: from r56.edvax.de (port-92-195-109-47.dynamic.qsc.de [92.195.109.47]) by mx01.qsc.de (Postfix) with ESMTP id 4E7543CEEA; Sun, 3 Mar 2013 04:17:38 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id r233HhBP001925; Sun, 3 Mar 2013 04:17:43 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Sun, 3 Mar 2013 04:17:42 +0100 From: Polytropon To: "Julian H. Stacey" Subject: Re: rm -R Message-Id: <20130303041742.d445f674.freebsd@edvax.de> In-Reply-To: <201303022246.r22MjUfO034030@fire.js.berklix.net> References: <51323A76.2040203@webrz.net> <201303022246.r22MjUfO034030@fire.js.berklix.net> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "freebsd-questions@FreeBSD.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Mar 2013 03:25:07 -0000 On Sat, 02 Mar 2013 23:45:30 +0100, Julian H. Stacey wrote: > Hi, > Reference: > > From: Jos Chrispijn > > Date: Sat, 02 Mar 2013 18:44:22 +0100 > > Message-id: <51323A76.2040203@webrz.net> > > Jos Chrispijn wrote: > > > > Teske, Devin: > > > rm -R -- -S > > > > > > The "--" tells it "here's the end of the options, here come the file/directories" > > > > Almost: > > > > rm -R -- -S; > > > > did it, thanks very much for you help! > > This also works > rmdir ./-S > (& is probably the best generic naming method, & was valid decades > ago, before rm got the luxury of modern stuff eg -- & would work > for other commands that might not have delimieters such as -- ) > This also work but is over kill : > rmdir './-S' Just note that the ; has been part of the name in question, so the "end of command" sign would have to be part of the directory name: "rmdir ./-S;" and "rmdir './-S;' would be the alternatives to "rm -R -- -S;". I'd be interested in what happens when you have such a directory name and press PF8 in the Midnight Commander in order to delete it. Now go ahead and create a file "*" in / and tell a junior sysadmin to remove it. ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...