bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Jeremy Hetzler
Subject: bug#7775: rm -f emits no error message when deleting nonexistent file
Date: Mon, 3 Jan 2011 12:18:56 -0500

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]