×
UNIX.COM Login
Username:
Password:  
Show Password





×
UNIX.COM Login
Hello Unregistered
Welcome from United States
You are somewhere around Ashburn
Last Visit: 1 Minute Ago @ 06:59 PM
Bits: 0
UNIX Time: 1531695580

👤


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

👤 Login to reply

 
Thread Tools Search this Thread Display Modes
    #1  
Old 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 04-26-2013   -   Original Discussion by RAMA PULI
Corona688's Unix or Linux Image
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 13 July 2018, 1:06 PM EDT
Location: Saskatchewan
Posts: 22,722
Thanks: 1,192
Thanked 4,347 Times in 4,003 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 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 04-26-2013   -   Original Discussion by RAMA PULI
Corona688's Unix or Linux Image
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 13 July 2018, 1:06 PM EDT
Location: Saskatchewan
Posts: 22,722
Thanks: 1,192
Thanked 4,347 Times in 4,003 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 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 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.
Sponsored Links
    #7  
Old 04-26-2013   -   Original Discussion by RAMA PULI
Corona688's Unix or Linux Image
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 13 July 2018, 1:06 PM EDT
Location: Saskatchewan
Posts: 22,722
Thanks: 1,192
Thanked 4,347 Times in 4,003 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.
Easy -- he wants to make zip-style archives, not gzip-style streams.
Sponsored Links
👤 Login to reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 06:59 PM.

Unix & Linux Forums Content Copyright1993-2018. All Rights Reserved.