- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: compress: The parameter list is too long.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-08-2008 03:39 AM
тАО01-08-2008 03:39 AM
I'm trying to execute the uncompress command, like described below, on a 11.23 system and I'm getting the error "the parameterlist is too long".
I've seen solutions for this message on 10.20 system, but I didn't find any solution for 11.23.
Any idea?
SERVER1#compress -f *
/usr/bin/sh: /usr/bin/compress: The parameter list is too long.
Solved! Go to Solution.
- Tags:
- Arg list too long
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-08-2008 03:48 AM
тАО01-08-2008 03:48 AM
Re: compress: The parameter list is too long.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-08-2008 03:51 AM
тАО01-08-2008 03:51 AM
Re: compress: The parameter list is too long.
Perhaps something like this:
compress -f a*
compress -f b*
-OR-
compress -f [abcdefg]*
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-08-2008 04:05 AM
тАО01-08-2008 04:05 AM
Re: compress: The parameter list is too long.
wildcard file specifications (like "*") on
UNIX systems. "find" is the usual way to
avoid problems like this.
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1112480
(Or search anywhere for "parameter list is
too long".)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-08-2008 04:12 AM
тАО01-08-2008 04:12 AM
Re: compress: The parameter list is too long.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-08-2008 04:17 AM
тАО01-08-2008 04:17 AM
Re: compress: The parameter list is too long.
cd /mydir
ls | while read x
do
compress -f ${x}
done
will not run into this problem...
if you only want files ending in .log then
cd /mydir
ls *.log | while read x
do
compress -f ${x}
done
etc....
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-08-2008 05:34 AM
тАО01-08-2008 05:34 AM
SolutionThe problem is that the shell reachs a limit with the lenght of the whole command generated by expanding the wildcard *.
So the first thing is to find a command that generate the list of files you want to compress. You must avoid doing this job by the shell itself. Well, "find" is a good command for that.
Now you must generate a command line that will not exceed the maximum length (LINE_MAX)of a line of Shell (man 5 limits / man 2 sysconf). Well, "xargs" is a also a good command for that as it will build commands line with care of LINE_MAX.
So, one answer to your question, could be :
find . | xargs compress
--> find will generate the list of files you want to compress. You can have more filters with find. For example find -name "*.log". (man find).
--> xargs will construct the command "compress file1 file2 ... filen" then "compress filen+1 filen+2 ..." according to LINE_MAX limit and as many times as necessary to treat all the list of files generated by cpio
Hope this will help
Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-08-2008 11:34 AM
тАО01-08-2008 11:34 AM
Re: compress: The parameter list is too long.
Also, have you tried uncompressdir(1)? (But it may have the same problem?)
Note it is recursive.