Sounds like it says you must not write those error message if -f is used. Kind of a strange requirement as `2>/dev/null` would do that.
On Fri, 16 Jun 2017 20:14:58 +0200 Hiltjo Posthuma <hil...@codemadness.org> wrote: > On Fri, Jun 16, 2017 at 02:08:24PM -0300, Marc Collin wrote: > > Hello all. > > > > I found a case where sbase rm command fails but doesn't output any > > error message, making it look like it succeeded. > > > > mkdir ./test > > mkdir ./test/test > > sudo chown root:root ./test > > sudo chown root:root ./test/test > > rm -rf ./test > > > > rm won't output anything and exit (apparently) cleanly. > > But the ./test directory won't be deleted. > > Shouldn't a meaningful message be printed to warn about the failure? > > > > Regards. > > > > Hi, > > Regarding the status code: you specify -f so the exit status is not > modified[0]. > > I'm not sure if it's required to print a warning message with the -f option. > My interpretation is it's not neccesary. However on OpenBSD it says: > > $ rm -rf test/ > rm: test/test: Permission denied > rm: test: Operation not permitted > > I don't fully understand the wording in POSIX on the page[0]. > > [0] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html >
pgporVpVwjpde.pgp
Description: OpenPGP digital signature