Computing.Net > Forums > Unix > The parameter list is too long (AIX)

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

The parameter list is too long (AIX)

Reply to Message Icon

Name: gilles
Date: November 14, 2001 at 08:29:50 Pacific
Comment:

I have a problem with the command :
tar cvf - `ls | grep -v "TAR" | grep -v "DMP" | xargs`| compress -c > file.Z

error 0403-027 the parameter list is too long

There is more on thousand files in the directory.

I hope you can help me

Thanks Gilles



Sponsored Link
Ads by Google

Response Number 1
Name: James Boothe
Date: November 14, 2001 at 09:16:51 Pacific
Reply:

I think it is xargs complaining about the lengthy parameter list. On that assumption, you could try using xargs -s nnnn to increase the argument list size.

If that doesn't work, you can avoid xargs by breaking into two commands:

tar cf file `ls|grep -ve "TAR" -e "DMP"`
compress file

which will require a lot more interim disk space, although the same final disk space.

I used multiple arguments on a single grep to do the excludes, which is supported by XPG4 version. Otherwise, you can do two separate greps as you have shown.

James


0
Reply to Message Icon

Related Posts

See More


quota restart shell script



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: The parameter list is too long (AIX)

The parameter list is too long www.computing.net/answers/unix/the-parameter-list-is-too-long/3585.html

Parameter list is too long for tar www.computing.net/answers/unix/parameter-list-is-too-long-for-tar/3876.html

paramer listing is too long www.computing.net/answers/unix/paramer-listing-is-too-long/5327.html