From owner-freebsd-bugs@FreeBSD.ORG Fri Aug 3 21:39:34 2007 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CAF416A41A for ; Fri, 3 Aug 2007 21:39:34 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from galain.elvandar.org (redqueen.elvandar.org [217.148.169.55]) by mx1.freebsd.org (Postfix) with ESMTP id D828413C442 for ; Fri, 3 Aug 2007 21:39:33 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from evilcoder.xs4all.nl ([195.64.94.120] helo=elvandar.local) by galain.elvandar.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1IH4rs-000C9s-3q; Fri, 03 Aug 2007 23:39:32 +0200 Message-ID: <46B3A09B.7010806@FreeBSD.org> Date: Fri, 03 Aug 2007 23:39:39 +0200 From: Remko Lodder User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: "John S. Strock" , bug-followup@FreeBSD.org, freebsd-bugs@FreeBSD.org References: <200708032122.l73LMTmh012559@www.freebsd.org> In-Reply-To: <200708032122.l73LMTmh012559@www.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: misc/115183: Can't delete certain files X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2007 21:39:34 -0000 John S. Strock wrote: >> Number: 115183 >> Category: misc >> Synopsis: Can't delete certain files >> Confidential: no >> Severity: non-critical >> Priority: low >> Responsible: freebsd-bugs >> State: open >> Quarter: >> Keywords: >> Date-Required: >> Class: sw-bug >> Submitter-Id: current-users >> Arrival-Date: Fri Aug 03 21:30:04 GMT 2007 >> Closed-Date: >> Last-Modified: >> Originator: John S. Strock >> Release: 6.2 >> Organization: > Bridgerland Applied Technology College >> Environment: > FreeBSD Server-2.BATC-IT.local 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Tue Feb 6 22:42:34 MST 2007 root@Server-2.BATC-IT.local:/usr/obj/usr/src/sys/Server-2 i386 >> Description: > I can create files with a leading hyphens, for example "-r" or "-rabbit", by either copying a file (i.e. "cp testfile -r") or opening vi and and then saving with the filename "-r". But I can't delete these files. Each command I use think's the "-r" is an option rather than a file so I get an error. >> How-To-Repeat: > Create a file with a leading hyphen either one of two ways (that I've tried anyway). > > 1) Starting vi, then saving the file with a leading hyphen. i.e. "-rabbit". > > 2) Copy another file. i.e. "cp myfile -rabbit" >> Fix: > The folder that has the hyphenated filenames can be deleted, but I'm not sure how to delete the filenames directly (i.e you don't want to delete the folder, just the file). > >> Release-Note: Hello, The solution might be to use rm ./-rabbit in the directory containing the 'offending file'. This most often works with files like this. Note that this is not a PR ticket worth, but a general support question, i will close the PR in question. Please consider using http://lists.freebsd.org/mailman/listinfo/freebsd-questions/ the next time you have a question like this. Thanks for using FreeBSD though! Cheers remko -- Kind regards, Remko Lodder ** remko@elvandar.org FreeBSD ** remko@FreeBSD.org /* Quis custodiet ipsos custodes */