Subject: bug#7775: closed (Re: bug#7775: rm -f emits no error message when deleting nonexistent file)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 03 Jan 2011 16:55:02 +0000

Your bug report

#7775: rm -f emits no error message when deleting nonexistent file

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
7775: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7775
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#7775: rm -f emits no error message when deleting nonexistent file
From: Bob Proulx <[email-masked]>
To: Jeremy Hetzler <[email-masked]>
Cc: [email-masked]
Date: Mon, 3 Jan 2011 10:01:21 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

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

Subject: rm -f emits no error message when deleting nonexistent file
From: Jeremy Hetzler <[email-masked]>
To: [email-masked]
Date: Mon, 3 Jan 2011 10:12:26 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

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.