Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Arg list too long - while using unix shell commands.

 
Peter Rooke
Ranch Hand
Posts: 847
1
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers - just a quick Solaris shell question. I keep getting a - "arg list too long" as I'm dealing with a large volume of files. So for example:



My way round this would be to use a for loop:




But does anyone know how this can be done quicker? (thanks in advance )
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the xargs utility - it can be used to get around this problem. Not sure if it's going to be faster than using a loop, though.
 
Peter Rooke
Ranch Hand
Posts: 847
1
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks - speeds not an issue as I'm just tar'ing and compressing to make room! Got to keep the sys admins happy

Did a quick trawl on the web and found this: http://blog.kloppmagic.ca/archives/2004/12/21/using-xargs/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic