Take the 2-minute tour ×
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.

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

1 Answer 1

up vote 5 down vote accepted

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

From the xargs(1) manpage:

-r
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.

-0
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! –  user815423426 Jul 20 '13 at 0:45
1  
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

 
discard

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.