GNU bug report logs - #7775
rm -f emits no error message when deleting nonexistent file

Previous Next

Package: coreutils;

Reported by: Jeremy Hetzler <jeremyhetzler <at> gmail.com>

Date: Mon, 3 Jan 2011 15:55:01 UTC

Severity: normal

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jeremy Hetzler <jeremyhetzler <at> gmail.com>
To: Eric Blake <eblake <at> redhat.com>
Cc: 7775 <at> debbugs.gnu.org
Subject: bug#7775: rm -f emits no error message when deleting nonexistent file
Date: Mon, 3 Jan 2011 12:18:56 -0500
[Message part 1 (text/plain, inline)]
On Mon, Jan 3, 2011 at 12:00 PM, Eric Blake <eblake <at> redhat.com> wrote:

> On 01/03/2011 08:12 AM, Jeremy Hetzler wrote:
> > rm normally produces an error when you delete a nonexistent file.
> However,
> > under -f, you get no error message. I would argue this is a bug.
>
> Thanks for the report; however, this behavior is by design, and required
> by POSIX:
>
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html
>
> > 1. If the file does not exist:
> >
> >    a. If the -f option is not specified, rm shall write a diagnostic
> message to standard error.
> >    b. Go on to any remaining files.
>
> That is, the whole point of -f is to silence warnings, including
> warnings about non-existent files.
>
>
I see. Thanks.

---
Jeremy Hetzler
[Message part 2 (text/html, inline)]

This bug report was last modified 14 years and 200 days ago.

Previous Next


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