How to extract contents of ONLY one directory from ZIP folder.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to extract contents of ONLY one directory from ZIP folder.
# 1  
Old 03-03-2011
How to extract contents of ONLY one directory from ZIP folder.

I have a ZIP folder ( folder.zip or folder.jar ) which contains , lets say 3 directories under it ( directory1, directory2, directory3).

How can i unzip the contents of directory2 ONLY ? I do not have to unzip the complete folder.

TIA.
# 2  
Old 03-04-2011
Any Takers ??
# 3  
Old 03-04-2011
Did you try
Code:
unzip folder.zip 'directory2/*'

?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Folder contents getting appended as strings while redirecting file contents to a variable

Hi one of the output of the command is as below # sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/' Resource List : <br> *************************** 1. row ***************************<br> ... (2 Replies)
Discussion started by: vivek d r
2 Replies

2. Shell Programming and Scripting

copy folder and its contents to another folder

Hi experts, I am coming to you with this basic question on copying a folder and its content from one location to another folder using PERL script. This is my requirement. I have a folder AB under /users/myhome I want to copy AB and its contents to /user/workspace. Finally it should... (1 Reply)
Discussion started by: amvarma77
1 Replies

3. Shell Programming and Scripting

zip the folder and loaded to ftp

Hi , I am working on a script which will do the below things 1) It will checkout from the repository 2) then zip that checkout stuff 3) and put the zip folder to FTP server Here my question is I am able to checkout successfully through this coomand svn co... (2 Replies)
Discussion started by: rohit22hamirpur
2 Replies

4. UNIX for Dummies Questions & Answers

Zip recursive content of folder when (not current directory=

Hi, Is there a way to zip the content (recursively) of a folder other then the current directory, and keep the directory structure intact? Example: /var/tmp/myfolder ----------------- file1 ----------------- file2 ----------------- folder1 ------------------------ file3 Now I want... (3 Replies)
Discussion started by: jimih
3 Replies

5. UNIX and Linux Applications

Zip command for large folder

I am trying to zip a folder, its size is more than 3 GB. I used below command zip -r foo middleware -x "*path*" This command fails every time with message "Filesize exceeded limit" Can some one help me how to over come this problem and zip the entire folder without splitting it. ... (2 Replies)
Discussion started by: ariram
2 Replies

6. UNIX for Dummies Questions & Answers

Zip command (zip folder doesn't include a folder of the same name)

Hi guys, I have a question about the zip command. Right now I have a directory with some files and folders on it that I want to compress. When I run the zip command: zip foo -r I am getting a foo.zip file that once I unzip it contains a foo folder. I want to create the foo.zip, but that... (1 Reply)
Discussion started by: elioncho
1 Replies

7. Windows & DOS: Issues & Discussions

How can I upload a zip folder on a unix path from my windows folder?

Hello, I am an amature at UNIX commands and functionality. Please could you all assist me by replying to my below mentioned querry : How can I upload a zip folder on a unix path from my windows folder? Thanks guys Cheers (2 Replies)
Discussion started by: ajit.yadav83
2 Replies

8. Shell Programming and Scripting

Zip the folder

i want the scripts or unix command to zip the folder. (3 Replies)
Discussion started by: kingganesh04
3 Replies

9. UNIX for Dummies Questions & Answers

Zip a folder including its sub-folders.

Hi, I have a folder that contains a few sub-folders. I would like to zip that folder and KEEP the subfolders. What it does at the moment is taking all the files within the subfolders and zipping them into one big file (zip -r ...). Does anyone know the UNIX command to keep the subfolders in the... (3 Replies)
Discussion started by: gdog
3 Replies

10. UNIX for Dummies Questions & Answers

zip a folder

is it possible to zip a whole folder instead of each file individually? (3 Replies)
Discussion started by: rprules
3 Replies
Login or Register to Ask a Question