2013-08-21 It's been one month since my last entry. This means, I've not been doing much computer work lately. I've been on holidays, off- line. I've had a cronjob that invoked such a command: find ... | xargs rm This works fine as long as there are some files to remove. If `find' generates an empty output, `rm' will fail: rm: missing operand Try `rm --help' for more information. To be exact, if you use GNU xargs(1) or any POSIX-complient im- plementation, the command will be run at least one time, even if there is no input. BSD xargs(1) runs the command only if there is any input (perhaps the better choice). However, to prevent the useless error message from appearing, I've had a look at the man page of GNU xargs(1): --no-run-if-empty -r If the standard input does not contain any non- blanks, do not run the command. Normally, the command is run once even if there is no input. This option is a GNU extension. (I welcome the new trend in GNU man pages to mark the extensions to POSIX.) So, here we have a way to let GNU xargs act as BSD xargs, but it is not portable. For some days, I've had the cronjob command this way: find ... | xargs -r rm Then, when I thought of it again, it occured to me, that the portable solution is simple to achieve ... if you manage to take a step back to widen the solution space: I don't want to get an error message, but I don't care if xargs has this option or not. The solution is simple: find ... | xargs rm -f With `-f', rm does not care for failures. Although this solution is satisfying for this case, it is not general because xargs still invokes the tool, which may or may not have an option to behave as wished when invoked without argu- ments. http://marmaro.de/lue/ markus schnalke