On Mon, Jan 3, 2011 at 12:00 PM, Eric Blake <eblake@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