zip -r <directory> failing due to 2GB limit - Just asking opinion


 
Thread Tools Search this Thread
Operating Systems Solaris zip -r <directory> failing due to 2GB limit - Just asking opinion
# 1  
Old 03-15-2012
zip -r <directory> failing due to 2GB limit - Just asking opinion

Hi,

Am trying to run zip -r on a 2.4G directory and it is failing with the error below. I believe this is because of the 2G limit of the zip program.

Code:
server101(oper01)[]/u01/temp$: date
Thu Mar 15 12:53:44 NZDT 2012
server101(oper01)[]/u01/temp$: ls -l
total 8
drwxr-x--x   4 oracle   dba         4096 Aug 27  2010 client_install
server101(oper01)[]/u01/temp$: du -sh client_install
 2.4G   client_install
server101(oper01)[]/u01/temp$: uname -a
SunOS server101 5.9 Generic_122300-52 sun4u sparc SUNW,Ultra-80
server101(oper01)[]/u01/temp$: zip -r client_install.zip client_install

...
...
...


  adding: client_install/Disk1/stage/Patches/oracle.network.rsf/10.2.0.4.0/1/DataFiles/filegroup4.24.1.jar (stored 0%)
  adding: client_install/Disk1/stage/Patches/oracle.network.rsf/10.2.0.4.0/1/DataFiles/filegroup4.23.1.jar (stored 0%)
  adding: client_install/Disk1/stage/Patches/oracle.network.rsf/10.2.0.4.0/1/DataFiles/filegroup4.22.1.jar (deflated 0%)
  adding: client_install/Disk1/stage/Patches/oracle.network.rsf/10.2.0.4.0/1/DataFiles/filegroup7.1.1.jarzip I/O error: File too large

zip error: Output file write failure (write error on zip file)

Initial workaround I used is to tar -cvf client_intall.tar ./client_install and then do gzip client_install.tar which works fine but is a two (2) step process.

From Googling I found the following which looks better and is a one-liner, I mean sort of.

Code:
 http://erwied.dns2go.com/oreilly_unix30/upt/ch15_07.htm - 15.7. Save Space: tar and compress a Directory Tree

% cd project
% tar clf - . | gzip --best > ../project.tar.gz
% gzcat ../project.tar.gz | tar tvf

So using that link, I do as below:

Code:
cd client_install
tar clf - . | gzip --best > ../client_install.tar.gz

My question is, is it possible to get around without having to do the cd client_install thingy? Will it be better to use cpio instead?

Any feedback much appreciated. Thanks in advance.
# 2  
Old 03-19-2012
why not just run this?

Code:
tar clf - client_install | gzip --best > ../client_install.tar.gz

or use the -C flag for tar if your version supports it. If you have the GNU version you can do it all in one step.

Code:
tar -czvlf client_install.tar.gz client_install

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Untar to a particular directory is Failing

Below are my system and tar details. bash-3.2$ uname -a SunOS mymac 5.10 Generic_150400-40 sun4v sparc sun4v bash-3.2$ which tar /usr/bin/tar I use this command to untar at the file at this location: /web/applications/configurations tar -xvf bent.tar -C... (18 Replies)
Discussion started by: mohtashims
18 Replies

2. Shell Programming and Scripting

SSH is failing due to unknown reason

Hi, I have setup keys between user1@server1 and user2@server2 however, the ssh is failing. server1 is Linux 3.10.0-514.6.2.el7.x86_64 #1 SMP whereas server2 is 5.10 Generic_150400-40 sun4v sparc sun4v I have checked port 22 to be open and keys to be correct. I also find the permissions... (3 Replies)
Discussion started by: mohtashims
3 Replies

3. Shell Programming and Scripting

Ssh failing due to Bad owner error

i am logged in with "user1" on host1. I m trying to ssh to host2 using user id "user2" $ ssh user2@host2 Bad owner or permissions on /home/user1/.ssh/config Question 1: Can you please tell me why am i getting the Bad owner permissions error on that directory ? Question 2: Where is it... (7 Replies)
Discussion started by: mohtashims
7 Replies

4. UNIX for Dummies Questions & Answers

Zip all files in a directory and move to another directory

Hi, need to zip all files in a directory and move to another directory after the zip.. i am using this one but didnt help me... zip -r my_proj_`date +%Y%m%d%H%MS`.zip /path/my_proj mv in_proj_`date +%Y%m%d%H%M%S`.zip /path/source/ i am trying to zip all the files in my_proj... (0 Replies)
Discussion started by: dssyadav
0 Replies

5. HP-UX

2GB file size limit

Greetings, I'm attempting to dump a filesystem from a RHEL5 Linux server to a VXFS filesystem on an HP-UX server. The VXFS filesystem is large file enabled and I've confirmed that I can copy/scp a file >2GB to the filesystem. # fsadm -F vxfs /os_dumps largefiles # mkfs -F vxfs -m... (12 Replies)
Discussion started by: bkimura
12 Replies

6. UNIX for Dummies Questions & Answers

Zip files inside the directory, but not the directory itself

Hi, Im facing a problem that im stucked, I have the following structure: thales@pereirtc-vbox:/home/VfARM$ ls code config doc lib manifest.bak manifest.rel manifest.v3 ns pub if i try to execute zip -q -o arm.zip VfARM/* it will create a zip file with the folder VfARM.... (2 Replies)
Discussion started by: Thales.Claro
2 Replies

7. Shell Programming and Scripting

Writing to file failing (maybe due to lock?)

Driver script kicks off supporter scripts in background. The supporter script writes it's own PID ($$) into a status file. When script completes, deletes the PID from the status file. The driver script constantly polls this status file for number of lines. As and when it's get lower than XX... (2 Replies)
Discussion started by: baivab
2 Replies

8. UNIX for Dummies Questions & Answers

Size Limit for zip files

Hi, I am using the jar command to compress a directory. The size of the directory contents is 105 GB. The jar/zip that gets created is approximately 5.5 GB in size. But this file seems to be corrupt when verified using the unzip command. Is there any limitation for the size of the zip file?... (4 Replies)
Discussion started by: prafulasher
4 Replies

9. Filesystems, Disks and Memory

tar 2GB limit

Any idea how to get around this limit? I have a 42GB database backup file (.dmp) taking up disk space because neither tar nor cpio are able to put it onto a tape. I am on a SUN Solaris using SunOS 5.8. I would appreciate whatever help can be provided. Thanks! (9 Replies)
Discussion started by: SLKRR
9 Replies

10. Solaris

SUN Solaris 9 - Is there a 2GB file size limit?

Hi I am using SUN/Solaris 9 and I was told that some unix versions have 2GB size limit. Does this applies to SUN/Solaris 9? Thanks. (2 Replies)
Discussion started by: GMMike
2 Replies
Login or Register to Ask a Question