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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Bob Proulx <bob <at> proulx.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#7775: closed (rm -f emits no error message when deleting
 nonexistent file)
Date: Mon, 03 Jan 2011 16:55:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 3 Jan 2011 10:01:21 -0700
with message-id <20110103170121.GA8477 <at> hysteria.proulx.com>
and subject line Re: bug#7775: rm -f emits no error message when deleting nonexistent file
has caused the GNU bug report #7775,
regarding rm -f emits no error message when deleting nonexistent file
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
7775: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7775
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jeremy Hetzler <jeremyhetzler <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: rm -f emits no error message when deleting nonexistent file
Date: Mon, 3 Jan 2011 10:12:26 -0500
[Message part 3 (text/plain, inline)]
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.

-- Jeremy Hetzler

-------------------------------------

520 $ /bin/rm nonexistent
/bin/rm: cannot remove `nonexistent': No such file or directory

521 $ /bin/rm -f nonexistent

522 $ rm --version
rm (GNU coreutils) 8.5
Packaged by Cygwin (8.5-2)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, Richard M. Stallman,
and Jim Meyering.
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: Bob Proulx <bob <at> proulx.com>
To: Jeremy Hetzler <jeremyhetzler <at> gmail.com>
Cc: 7775-done <at> debbugs.gnu.org
Subject: Re: bug#7775: rm -f emits no error message when deleting
	nonexistent file
Date: Mon, 3 Jan 2011 10:01:21 -0700
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.

Thank you for the bug report.  But this is not a bug.  That is the
correct and desired behavior.  That is the way it is supposed to work.
This is documented in the manual.

  $ info coreutils 'rm invocation'

  `-f'
  `--force'
       Ignore nonexistent files and never prompt the user.  Ignore any
       previous `--interactive' (`-i') option.

This is core behavior and is also standardized across all Unix
systems.  Here is a pointer to the online standards documentation.

  http://pubs.opengroup.org/onlinepubs/009695399/utilities/rm.html

Bob


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.