Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have seen examples on the web of xargs with the argument -r0. What does this argument mean? My man pages don't show any entries for -r0 nor do most man pages I have seen (e.g. http://linux.die.net/man/1/xargs)

share|improve this question
up vote 7 down vote accepted

-r0 is two flags. It is -r and it is -0.

From the xargs(1) manpage:

If the standard input does not contain any nonblanks, do not run the command. Normally, the command is run once even if there is no input. This option is a GNU extension.

Input items are terminated by a null character instead of by whitespace, and the quotes and backslash are not special (every character is taken literally). Disables the end of file string, which is treated like any other argument. Useful when input items might contain white space, quote marks, or backslashes. The GNU find -print0 option produces input suitable for this mode.

share|improve this answer
Can't believe I missed this one. Thanks! – Amelio Vazquez-Reina Jul 20 '13 at 0:45
I missed it too. Duh it's 2 switches. I didn't even think of that, thanks Evan! – slm Jul 20 '13 at 0:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.