GNU bug report logs - #22998
File removal bug

Previous Next

Package: coreutils;

Reported by: Avineshwar Singh <asingh16 <at> stevens.edu>

Date: Sat, 12 Mar 2016 17:46:01 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22998 in the body.
You can then email your comments to 22998 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#22998; Package coreutils. (Sat, 12 Mar 2016 17:46:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Avineshwar Singh <asingh16 <at> stevens.edu>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 12 Mar 2016 17:46:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Avineshwar Singh <asingh16 <at> stevens.edu>
To: bug-coreutils <at> gnu.org
Subject: File removal bug
Date: Sat, 12 Mar 2016 12:33:22 -0500
Hi.

Let's say I manage to create a file named "-filename.extension". It's not being removed using "rm -filename.extension", however, it is being removed using "/filepath/-filename.extension".
There is a potential fix for this. It is existing in Ubuntu, Fedora, NetBSD, FreeBSD and OmniOS, atleast.




Added tag(s) notabug. Request was from Eric Blake <eblake <at> redhat.com> to control <at> debbugs.gnu.org. (Sun, 13 Mar 2016 03:49:02 GMT) Full text and rfc822 format available.

Reply sent to Eric Blake <eblake <at> redhat.com>:
You have taken responsibility. (Sun, 13 Mar 2016 03:49:02 GMT) Full text and rfc822 format available.

Notification sent to Avineshwar Singh <asingh16 <at> stevens.edu>:
bug acknowledged by developer. (Sun, 13 Mar 2016 03:49:02 GMT) Full text and rfc822 format available.

Message #12 received at 22998-done <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Avineshwar Singh <asingh16 <at> stevens.edu>, 22998-done <at> debbugs.gnu.org
Subject: Re: bug#22998: File removal bug
Date: Sat, 12 Mar 2016 20:47:58 -0700
[Message part 1 (text/plain, inline)]
tag 22998 notabug
thanks

On 03/12/2016 10:33 AM, Avineshwar Singh wrote:
> Hi.
> 
> Let's say I manage to create a file named "-filename.extension". It's not being removed using "rm -filename.extension",

Indeed, and that's a FAQ:

https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#I-have-a-file-called-_002d_002dhelp_002e-How-do-I-remove-it_003f

> however, it is being removed using "/filepath/-filename.extension".

Indeed, and that is one of the work-arounds for this non-bug.  The other
workaround is to use:

rm -- -filename.extension.

> There is a potential fix for this. It is existing in Ubuntu, Fedora, NetBSD, FreeBSD and OmniOS, atleast.

This is not a bug, but the behavior mandated by POSIX.  Therefore I'm
closing this report.  However, feel free to ask further related
questions in response to this thread.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 10 Apr 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 74 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.