Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Zip Multiple files to One .zip file in AIX system

Shell Programming and Scripting


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 04-26-2013   -   Original Discussion by RAMA PULI
RAMA PULI's Unix or Linux Image
RAMA PULI RAMA PULI is offline
Registered User
 
Join Date: Apr 2013
Last Activity: 29 April 2013, 12:39 PM EDT
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Zip Multiple files to One .zip file in AIX system

Hi
I have a requirement in unix shell where I need to zip multiple files on server to one single .zip file. I dont see zip command in AIX and gzip command not doing completely what I want.
One I do .zip file, I should be able to unzip in my local Computer.

Here is example what I want
a1.txt
a2.txt
a3.txt
output should be a.zip and when I unzip on local desktop it should be same as above a.txt,b.txt and c.txt

Please help me to resolve this
thanks in advance
Sponsored Links
    #2  
Old Unix and Linux 04-26-2013   -   Original Discussion by RAMA PULI
Corona688's Unix or Linux Image
Corona688 Corona688 is online now Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 26 April 2018, 11:31 AM EDT
Location: Saskatchewan
Posts: 22,643
Thanks: 1,172
Thanked 4,307 Times in 3,973 Posts
zip is indeed the standard and common command for this, if you don't have it, install it. gzip is definitely not the same thing.

Once you have it, you can use it like zip file.zip a1.txt a2.txt a3.txt which will create a zip file containing all the listed files. Wildcards like a*.txt ought to work.
Sponsored Links
    #3  
Old Unix and Linux 04-26-2013   -   Original Discussion by RAMA PULI
RAMA PULI's Unix or Linux Image
RAMA PULI RAMA PULI is offline
Registered User
 
Join Date: Apr 2013
Last Activity: 29 April 2013, 12:39 PM EDT
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
But could you please guide me the steps to install zip in AIX
I have no idea

thanks

---------- Post updated at 03:41 PM ---------- Previous update was at 02:33 PM ----------

Is there any other option without installing zip command will work? I think that involved a little hard process.

Can we do it using the same gzip command. Please let me know
thanks
    #4  
Old Unix and Linux 04-26-2013   -   Original Discussion by RAMA PULI
Corona688's Unix or Linux Image
Corona688 Corona688 is online now Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 26 April 2018, 11:31 AM EDT
Location: Saskatchewan
Posts: 22,643
Thanks: 1,172
Thanked 4,307 Times in 3,973 Posts
You asked and answered this yourself already -- gzip isn't zip. Different kinds of files. You need zip.

Unfortunately I don't know the specifics of this for AIX. I do know you'd need to find the one for your version, what exact version do you have? uname -a
Sponsored Links
    #5  
Old Unix and Linux 04-26-2013   -   Original Discussion by RAMA PULI
RAMA PULI's Unix or Linux Image
RAMA PULI RAMA PULI is offline
Registered User
 
Join Date: Apr 2013
Last Activity: 29 April 2013, 12:39 PM EDT
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Version 6
Sponsored Links
    #6  
Old Unix and Linux 04-26-2013   -   Original Discussion by RAMA PULI
hanson44's Unix or Linux Image
hanson44 hanson44 is offline
Registered User
 
Join Date: Mar 2013
Last Activity: 12 May 2013, 11:33 PM EDT
Posts: 858
Thanks: 18
Thanked 183 Times in 178 Posts
Quote:
not doing completely what I want
It would help it you would show what it's doing, and explain what more you want. Linux
Sponsored Links
    #7  
Old Unix and Linux 04-26-2013   -   Original Discussion by RAMA PULI
Corona688's Unix or Linux Image
Corona688 Corona688 is online now Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 26 April 2018, 11:31 AM EDT
Location: Saskatchewan
Posts: 22,643
Thanks: 1,172
Thanked 4,307 Times in 3,973 Posts
Quote:
Originally Posted by hanson44 View Post
It would help it you would show what it's doing, and explain what more you want. Linux
Easy -- he wants to make zip-style archives, not gzip-style streams.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Zip multiple files recursively via UNIX anou UNIX for Dummies Questions & Answers 3 02-06-2012 09:49 AM
Zip multiple files and copy to help pawannoel UNIX for Dummies Questions & Answers 3 04-05-2011 12:14 AM
creating a multiple zip files pranabrana Shell Programming and Scripting 1 12-17-2010 05:42 AM
ZIP multiple files and also specify size of zip file tom007 AIX 1 03-16-2010 02:29 AM
unzip .zip file and list the files included in the .zip archive oracledev UNIX for Dummies Questions & Answers 5 04-08-2008 04:49 PM



All times are GMT -4. The time now is 11:36 AM.