2 Minutes To Code (β Version)

'xargs' command - 2 minute tutorial

Overview of 'xargs' command

The unix command xargs accepts standard-output of a command and uses it as as the command line parameter of another command.

The key to understanding xargs is to see some examples in action and play around with it. The comamnds find, ls and grep can feed filenames to the xargs command which can then call any unix comamnd that takes file names as arguments on all the these files or folders like mv, cp, grep, rm, gzip, zip, tar etc. It's a swiss knife for file and folder analysis and management.

We will start with a few basic examples and then explore all the advanced options that 'xargs' provides in the next few pages.