svn commit: r272372 - stable/10/bin/rm
Bruce Evans
brde at optusnet.com.au
Sat Oct 4 05:59:10 UTC 2014
On Sat, 4 Oct 2014, Bruce Evans wrote:
> On Fri, 3 Oct 2014, Garrett Cooper wrote:
>>
as filtering out these errors would handle the case that -f should
>> handle according to the manpage:
>>
>> -f Attempt to remove the files without prompting for confirmation,
>> regardless of the file's permissions. If the file does not
>> exist, do not display a diagnostic message or modify the exit
>> status to reflect an error. The -f option overrides any
>> previous
>> -i options.
>
> I didn't realize theat the man page was that broken. It doesn't even mention
> the main effect of -f -- to ignore errors for nonexistent files. This is
> discussed in the COMPATIBILITY section, with quite bad wording:
Oops, I missed the second sentence in the above.
> % COMPATIBILITY
> % The rm utility differs from historical implementations in that the -f
> % option only masks attempts to remove non-existent files instead of
> mask-
> % ing a large variety of errors. The -v option is non-standard and its
> use
> % in scripts is not recommended.
>
> "masks attempts to remove" is strange wording. rm doesn't attempt to
> remove nonexistent files; it attempts to remove existent files ...
>
> The code doesn't do anything like that. It is close to POSIX, and just
> tries to remove existent files and then ignores the ENOENT error for
> nonexistent files iff -f.
I misread this too. There are only minor wording problems.
Bruce
More information about the svn-src-stable
mailing list