rm does not print error messages when -f is used
When the -f option is passed to rm it does not print error messages meaning the only way to spot an error is to check the exit code. The manpage is also not clear on this. I think we should always be printing errors.
Updated by Gary Mills over 5 years ago
This exerpt from the man page seems clear to me:
The following options are supported for /usr/xpg4/bin/rm
f Does not prompt for confirmation. Does not write diag
nostic messages or modify the exit status in the case
of non-existent operands. Any previous occurrences of
the -i option is ignored.
That's the same as the Open Group standard.
Updated by Andrew Stormont over 5 years ago
That's pretty much why I filed the bug. I had a script that called 'rm -f' but it didn't have permission to remove the file and blew up. I ended up running truss on rm to see what was happening - not very nice when you consider GNU rm will just print out an error.
I prepared this webrev which makes rm a little more verbose when it comes to errors and also adds support for the -v flag. I'd like to submit it for review but I wonder if it might upset some of the standards obsessed folk within the illumos community.