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

From: Jim Meyering <[email-masked]>
Date: Mon, 03 Jan 2011 18:06:12 +0100

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.
...
> 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

Thanks for the report, but that's not a bug.
Rather, it is long-standing, documented and required behavior:

    $ rm --help                                                                  :
    Usage: rm [OPTION]... FILE...
    Remove (unlink) the FILE(s).

      -f, --force           ignore nonexistent files, never prompt