[Ilugc] XArgs

  • From: balu.manyam@xxxxxxxxx (Balu manyam)
  • Date: Sat Jun 7 22:57:39 2008

On Sat, Jun 7, 2008 at 8:13 PM, Kapil Hari Paranjape <kapil@xxxxxxxxxxx>
wrote:

Hello,

On Sat, 07 Jun 2008, Masatran, R. Deepak wrote:
Eureka! I scanned the man page again and found a switch "-l" which forces
each input argument to be processed separately. Therefore, it is

    xargs -l foo

that is equivalent to

    xargs -i foo {}

Now onwards, I will always use "-l" with XArgs.

Be careful. The man page also says:

       The -l option is deprecated since the POSIX  standard
       specifies -L instead.

So it may be better to use

       xargs -L 1 foo

Kapil.


btw xargs is much  more efficient than 'find -exec' - you can read the  good
discussion here
http://www.sunmanagers.org/pipermail/summaries/2005-March/006255.html

Other related posts: