gzip issue?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting gzip issue?
# 1  
Old 09-26-2015
gzip issue?

I have unix file to gzip few files like below

Code:
xyz.ksh
 !/bin/ksh
 .
 .
 gzip  d1/*txt d1/*dat
  
 .
 .
 .

There are 5 .txt files in d1 directory.

out of 5 files one file is not getting zipped.

I checked and found that the unzipped file size is more than 2 GB.

But I manually able to zip the file.

There is sufficient disk space available.

I do not think its space issue.

could anybody help me out here.

Thank you in advance.
Abhi

Last edited by vbe; 09-27-2015 at 09:08 AM.. Reason: plain english please, code tags...
# 2  
Old 09-27-2015
abhiabhi,

1. You say there are 5.txt files in d1 directory, but you have *dat as well? Are these files being zipped as expected?
2. Can you list contents of d1 before and after you run gzip?
3. What is the output of the script execution? e.g. is gzip returning an error?
4. List the entire script.

Last edited by mjf; 09-27-2015 at 01:03 PM..
# 3  
Old 09-28-2015
Quote:
Originally Posted by mjf
abhiabhi,

1. You say there are 5.txt files in d1 directory, but you have *dat as well? Are these files being zipped as expected?
2. Can you list contents of d1 before and after you run gzip?
3. What is the output of the script execution? e.g. is gzip returning an error?
4. List the entire script.

Sir,

1.Yes I have .dat files as well .txt files in d1 floders
.dat files are very small size
2.only one file is >2GB, rest are around 1 GB

3.all looks good to me.there is no error encountered.
4.its simply not zipping the file
# 4  
Old 09-29-2015
What version of gzip you are running ?. Is the destination filesystem same as the current one where the source file is residing ?. If not, does the destination file system has large file support.

By the looks of it, you may be running an older version of gzip which has a limitation of 2gb file size. Please check the newer version or try bzip.
# 5  
Old 09-29-2015
Quote:
Originally Posted by linuxmanju
What version of gzip you are running ?. Is the destination filesystem same as the current one where the source file is residing ?. If not, does the destination file system has large file support.

By the looks of it, you may be running an older version of gzip which has a limitation of 2gb file size. Please check the newer version or try bzip.
Hi Thanks for information,
but i do not think its a verison issue as i am able to gzip thel fine manually.
Also I am gzipping and keeping same directory. tehre is mor ethan 20 GB space free.
# 6  
Old 09-29-2015
How many files are there in the directory? You could be hitting the limits of how many files you can fit in a single commandline.
# 7  
Old 09-29-2015
Could you post the real full path file that you say it doesn't zip? Perhaps, copy and paste the result of ls -l </path/to/filename.dat>

---------- Post updated at 12:01 PM ---------- Previous update was at 11:39 AM ----------

Quote:
Originally Posted by Corona688
How many files are there in the directory? You could be hitting the limits of how many files you can fit in a single commandline.
If this were the case, you would be getting an error condition E2BIG, and the OP says that not errors occur.
This User Gave Thanks to Aia For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Gzip

if ;then echo "mrnet greater 5000" gzip /var/log/mrnet.log /var/log/mrnet.log.1.gz fi i'm looking if mrnet.log is bigger then 5000 then compress mrnet.log to mrnet.log.1.gz but it won't compress. (3 Replies)
Discussion started by: Froob
3 Replies

2. Shell Programming and Scripting

gzip

how to zip all log file in a folder expect the latest gzip * ---> will zip all log files but I don't want the latest file to be zipped ex: file1, file2, file3, file4, file5 any single command to gzip all files excpet file5 ? (2 Replies)
Discussion started by: rmann
2 Replies

3. Shell Programming and Scripting

Help with GZIP

Hi Gurus, I have a requirement to zip a file using gzip and ftp it to target server. I am using a gzip script as below. gzip.sh #!/bin/ksh /usr/bin/gzip -9 $1 Filename for gzip.sh is passed by an application program. so the output for ./gzip.sh Test_YYYYMMDDHHMMSS.txt (file name is... (1 Reply)
Discussion started by: PRVARMA
1 Replies

4. UNIX for Advanced & Expert Users

gzip vs pipe gzip: produce different file size

Hi All, I have a random test file: test.txt, size: 146 $ ll test.txt $ 146 test.txt Take 1: $ cat test.txt | gzip > test.txt.gz $ ll test.txt.gz $ 124 test.txt.gz Take 2: $ gzip test.txt $ ll test.txt.gz $ 133 test.txt.gz As you can see, gzipping a file and piping into gzip... (1 Reply)
Discussion started by: hanfresco
1 Replies

5. Shell Programming and Scripting

gzip

Hi, I want to gzip files in loop. for i in `ls *.xml`; do gzip $i; done But i am gettin error like "/usr/bin/ls: Arg list too long" Also please tell me how to do it with while loop and also using find and then exec. (7 Replies)
Discussion started by: tushar_tus
7 Replies

6. Shell Programming and Scripting

Gzip help

Hi Experts!! I was creating a zip file in a server which had zip installed in it. I have another server in which zip is not there and i am instructed to make use of gzip to compress files. I would need your help to know the way to create a gzip file. 1) I do the following to create the zip... (5 Replies)
Discussion started by: ganga.dharan
5 Replies

7. UNIX for Dummies Questions & Answers

gzip

Hi All, I have some files which are 01.tar.gz, 02.tar.gz,03.tar.gz ........30.tar.gz. when I want to extract the files I 'm using this command "gzip -dc *.tar.gz | tar -xvf -" but it just uncompress 01.tar.gz how can I uncompress all of them ? thanx alice (2 Replies)
Discussion started by: alisevA3
2 Replies

8. SCO

gzip

ciao a tutti, premesso che sono un principiante di unix, avrei bisogno di gzip/gunzip e SOPRATTUTTO delle istruzioni (ahimè dettagliatissime, come per un bimbo!) per installarlo... grazie mille, ciao (1 Reply)
Discussion started by: mfran2002
1 Replies

9. UNIX for Dummies Questions & Answers

GZIP help, please!

Gurus, My own stupidity (or ignorance...or both) put me in the situation I am in and I need help please: 1-My shell account (OS: HP UX v11) contains several work directories (/docs, /scripts...) 2-Our sysadmin has implemented aggressive disk quotas so I have to compress the files I put here... (2 Replies)
Discussion started by: alan
2 Replies

10. UNIX for Advanced & Expert Users

using gzip

Hi, I am trying to unzip a file that I unmounted onto a unix machine from a cd I had burned in a Windows machine. The file I am trying to unzip is a .tar file... it was originally a .tar.gz file because it was zipped using gzip. I have tried: % gzip -d hpux.tar (where hpux.tar is the file... (2 Replies)
Discussion started by: nattie_h
2 Replies
Login or Register to Ask a Question