From nobody@FreeBSD.org  Fri Aug  3 21:36:47 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5013D16A421
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  3 Aug 2007 21:36:47 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 515B613C457
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  3 Aug 2007 21:36:47 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l73LalFp018814
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 3 Aug 2007 21:36:47 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l73LakfK018813;
	Fri, 3 Aug 2007 21:36:47 GMT
	(envelope-from nobody)
Message-Id: <200708032136.l73LakfK018813@www.freebsd.org>
Date: Fri, 3 Aug 2007 21:36:47 GMT
From: "John S. Strock" <jstrock@batc.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Update to Can't delete certain types of files
X-Send-Pr-Version: www-3.0

>Number:         115184
>Category:       misc
>Synopsis:       Update to Can't delete certain types of files
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 03 21:40:01 GMT 2007
>Closed-Date:    Fri Aug 03 21:55:35 GMT 2007
>Last-Modified:  Fri Aug 03 21:55:35 GMT 2007
>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:
This is an update to the bug I just posted.  I've found a way to remove individual files.
>How-To-Repeat:

>Fix:
To delete an individual file, use the following command:

"rm bogusfilename -filenametodelete"

For example, I create a hyphenated filename using the following command:

"cp realfile -newfile"

"rm -newfile" doesn't work, because "rm" thinks "-newfile" is an option.

To delete, type:

"rm whatevernamehere -newfile"

The "whatevernamehere" could be a legitimate file, or one that doesn't exist, either way it'll delete the 2nd file.

>Release-Note:
>Audit-Trail:

From: Yuri Pankov <yuri@darklight.org.ru>
To: bug-followup@freebsd.org, "John S. Strock" <jstrock@batc.edu>
Cc:  
Subject: Re: misc/115184: Update to Can't delete certain types of files
Date: Sat, 4 Aug 2007 01:43:32 +0400

 --Bu8it7iiRSEf40bY
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Correct solution is to specify `--' before filename (-- means end of
 command options):
 
 rm -- -file
 
 Though this question should be asked at freebsd-question@freebsd.org
 mailing list....
 
 
 Yuri
 
 --Bu8it7iiRSEf40bY
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.7 (FreeBSD)
 
 iD8DBQBGs6GCeoAklVFrLdgRAqT7AJ9z64oVYeA5+tbjTZe5juugZIoOWgCdETto
 06ZHKl8DQXUCFqXw4kF59I0=
 =GHnc
 -----END PGP SIGNATURE-----
 
 --Bu8it7iiRSEf40bY--
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Fri Aug 3 21:55:34 UTC 2007 
State-Changed-Why:  
duplicate of 115183 

http://www.freebsd.org/cgi/query-pr.cgi?pr=115184 
>Unformatted:
