-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

The Ultimate Linux Shell Scripting Guide
By :

It’s fitting that I’m writing this on International Talk Like a Pirate Day, because when you pronounce the name of this utility just right, it really does sound like something that a pirate would say. So, all together now, in your best pirate voice. . .
Xaaaaarrrrrgs!
Okay, enough silliness. Let’s get to work.
Seriously, xargs
is a handy utility that can be used in a few different ways. Since the current topic is text-stream filters though, we’ll only look at it in that context for the time being. Later on, I’ll show you other uses for it.
xargs
doesn’t work by itself, and is always used with another utility. Its purpose is to take output from one source and use it as arguments for the other command. It works somewhat like the -exec
option with find
, but with a few differences. That is, xargs
can be used with other utilities besides find
, it has more options, and it’s more efficient. Let’s look at...