[Bug 197567] chflags -f argument ignored when no file found to be modified

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Feb 15 23:23:32 UTC 2015


Jilles Tjoelker <jilles at FreeBSD.org> changed:

           What    |Removed                     |Added
                 CC|                            |jilles at FreeBSD.org

--- Comment #1 from Jilles Tjoelker <jilles at FreeBSD.org> ---
The error message ("No match") you get is from tcsh. It happens before chflags
is started, so chflags cannot do anything about it.

With sh, the error message is:

chflags: /var/empty/*: No such file or directory

A command like  chflags -f noschg /  correctly prints no error message and
returns exit status 0, however.

To me, the text in the man page

     -f      Do not display a diagnostic message if chflags could not modify
             the flags for file, nor modify the exit status to reflect such

seems to match the behaviour I see: only failures to modify flags are
suppressed, while failures to locate files are unaffected. This matches chmod's
-f option, but that option is not standard either.

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list