I am using UNIX command to unzip the files
gzip -d9 DW_.gz
The Xmls are compressed using gzip and it is received in the .gz format at UNIX box which need to be uncompressed.
The above command is working fine for 400 compressed xmls(.gz files) but when the count becomes 401 or more i am facing a error like "The Parameter list is too long" and i am not able to uncompress the files.
I also tried with other commands like
gunzip DW_.gz
unzip DW_*.gz.
Using it with find and/or xargs will hand over every found file to the program one by one, in your case gunzip. The way you used it will hand over all at once, and that will hit the max limit of parameters for this program.
Sometimes when you want to delete all files in a folder and issue a rm and have more than 512 files in there, you can encounter this problem too and help yourself with find and/or xargs for example.
Programs that accept parameters are usually limit to a fix amount of them.
Tats great yaar......
Thank u so much.
I have another doubt too.
Is there any command to compress multiple files into a single .gz files using gzip utility?
One option is to concat the files and then compress them. I have 1000 xmls and could you suggest me a command to concate them as a single file and compress using gzip?