Help on gunzip


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help on gunzip
# 1  
Old 04-08-2009
Help on gunzip

Hi All,

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.

Any help is greatly appreciated.
# 2  
Old 04-08-2009
Maybe try something like
Code:
find . -type f -name "DW_*.gz" -exec gunzip {} \;
#or
find . -type f -name "DW_*.gz" -print | xargs gunzip

# 3  
Old 04-08-2009
Hey thanks a lot Smilie
Its working too good.....
Can u tell be the difference between the command which i used and what u suggested?
Thank a lot!!!!
# 4  
Old 04-08-2009
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.
# 5  
Old 04-09-2009
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?

Thanks for your efforts Taken!!!!
Great going!!!!
# 6  
Old 04-09-2009
I would just tar them and then zip the tar archive.

To concatenate them I have no tool in mind to do that quickly. Would have to write a small script that concatenates them with cat and >> maybe.
# 7  
Old 04-09-2009
Concat using cat command wud be a best option i guess.... Will try with that command too.........
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

gunzip status

Hi, I'm trying to run my application on HP-UX server. I have to extract a *.tar.gz file. I'm doing that now in 2 steps. first I gunzip it and then pax it. My question is how can I check whether the data in the *.tar.gz file is corrupted or not?? Now, I'm trying to do this... (1 Reply)
Discussion started by: Kyaw Lwin Phyo
1 Replies

2. Shell Programming and Scripting

Gunzip files

Hi ALL, Am working with the gunzip command to zip all the old files having 10 days am using the command find . -name '*.log' -type f -mtime +10 -exec gunzip {} \; am facing two issues 1.)it displays the files which are all older than a year 2.)when am trying to gunzip all the... (2 Replies)
Discussion started by: thelakbe
2 Replies

3. SCO

gunzip problem

hi On one of our SCO 5.0.6 server gunzip doesn't work and I'm getting this error message: # gunzip dynamic linker: gunzip: symbol not found: ___requires_updated_system_library_se_ Killed What's missing? (0 Replies)
Discussion started by: ccc
0 Replies

4. Shell Programming and Scripting

Gunzip files

Hello Everyone, I have a few files in a directory such as : abc.xyz.txt1.gz abc.xyz.txt2.gz .... .... ... ... abd.xyz.txt100.gz And I want uncompressed files such as: abc.xyz.txt1 abc.xyz.txt2 .... ... ..... .... (1 Reply)
Discussion started by: ad23
1 Replies

5. Shell Programming and Scripting

Help with gunzip

Hi All, I have a file "HOTEL_INFO.zip" and getting the below errors: server1:/home/arun# gunzip -S .zip HOTEL_INFO.zip gunzip: HOTEL_INFO.zip: first entry not deflated or stored -- use unzip server1:/home/arun#unzip HOTEL_INFO.zip ksh: unzip: not found. ... (11 Replies)
Discussion started by: Arunprasad
11 Replies

6. UNIX for Dummies Questions & Answers

gunzip

I have a zip file as a.zip and it contains 1m xml files. like a1.xml, a2.xml.... The size is also very big nearly 1GB. I want to extract only a123.xml. Can any one help how can I do this? (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

7. UNIX for Dummies Questions & Answers

gunzip syntax help

Hi All, I am a newbie to unix and need help. I am trying to unzip the files in source library to destination library. the input filename can be any thing with abc and after unzip, i want the same file name with original extension suppose,the input file is ABC_jun25.dat.gz after gunzip in the... (1 Reply)
Discussion started by: onlyjayaram
1 Replies

8. UNIX for Dummies Questions & Answers

gunzip question

unzip test.zip ==> This uncompresses and keeps the original zip file. gunzip test.gz ==> Removes the .gz file after uncompressing. Is there any switch to make the .gz file available after uncompression. Thanx in advance. (3 Replies)
Discussion started by: devs
3 Replies

9. UNIX for Dummies Questions & Answers

Gunzip

Hi can't unzip a gz file in TurboLinux 7.0 when i'm trying this gunzip filename.tar.gz it always says not in gzip format what should I do...please help me (4 Replies)
Discussion started by: CreamHarry
4 Replies

10. UNIX for Dummies Questions & Answers

gunzip....problem

Hi........... i have downloaded...sunscreen3.1 lite frm sunfreeware .com and it is in tar.gz format..so i download gzip also... now pls tell me how to install gzip and how to unzip tht sunscreen tar.gz file..............after unzipping i have to untar the tar file or not.....pls tell me in... (2 Replies)
Discussion started by: Prafulla
2 Replies
Login or Register to Ask a Question