Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Aug 2007 21:22:29 GMT
From:      "John S. Strock" <jstrock@batc.edu>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/115183: Can't delete certain files
Message-ID:  <200708032122.l73LMTmh012559@www.freebsd.org>
Resent-Message-ID: <200708032130.l73LU4Ar073341@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708032122.l73LMTmh012559>