From owner-freebsd-isp@FreeBSD.ORG Mon Apr 21 20:15:07 2003 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02E8237B401 for ; Mon, 21 Apr 2003 20:15:07 -0700 (PDT) Received: from doc.metva.com.au (c16477.brasd1.vic.optusnet.com.au [210.49.152.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05D5B43FDF for ; Mon, 21 Apr 2003 20:15:02 -0700 (PDT) (envelope-from enno@doc.metva.com.au) Received: by doc.metva.com.au (Postfix, from userid 1003) id EA867D78CB8; Tue, 22 Apr 2003 13:15:07 +1000 (EST) Date: Tue, 22 Apr 2003 13:15:07 +1000 From: Enno Davids To: Jim Weeks , freebsd-isp@freebsd.org Message-ID: <20030422031507.GJ97289@doc.metva.com.au> References: <20030421120037.P11148-100000@veager.jwweeks.com> <20030422030823.GC28830@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030422030823.GC28830@wantadilla.lemis.com> User-Agent: Mutt/1.4i Subject: Re: mv file with illegal character X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2003 03:15:07 -0000 On Tue, Apr 22, 2003 at 12:38:23PM +0930, Greg 'groggy' Lehey wrote: |On Monday, 21 April 2003 at 12:09:15 -0400, Jim Weeks wrote: |> This isn't a really a freebsd question, but I can't seem to find the answer |> to this elsewhere. I imagine that some of you may have come across the |> same situation. |> |> One of my clients has renamed a directory -backup and now she can't do a |> thing with it. Any command seems to pickup the -b as an option rather |> than part of the name. I've tried *backup and still the illegal option |> error occurs. |> |> Any ideas? | |Strangely, nobody else answered this: use ./-backup. . is the current |directory, so ./filename is the same as filename for any value of |"filename". Perhaps no one answered becasue the man page also has the answer... I quote: > The rm command uses getopt(3) to parse its arguments, which allows it to > accept the `--' option which will cause it to stop processing flag > options at that point. This will allow the removal of file names that > begin with a dash (`-'). For example: > rm -- -filename > The same behavior can be obtained by using an absolute or relative path > reference. For example: > rm /home/user/-filename > rm ./-filename Cheers, Enno.