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.

-- 
Eric Blake   [email protected]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to