Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Search through 2 levels of zip Post 302396326 by zaxxon on Thursday 18th of February 2010 07:26:58 AM
Old 02-18-2010
Not sure if I understood you correctly; I just checked it out - it display contents of subdirs with several levels:

Code:
$> zip -r my.zip *
  adding: a (stored 0%)
  adding: b (stored 0%)
  adding: dir1/ (stored 0%)
  adding: dir1/d (stored 0%)
  adding: dir1/c (stored 0%)
  adding: dir1/dir2/ (stored 0%)
  adding: dir1/dir2/f (stored 0%)
  adding: dir1/dir2/dir3/ (stored 0%)
  adding: dir1/dir2/dir3/h (stored 0%)
  adding: dir1/dir2/dir3/g (stored 0%)
  adding: dir1/dir2/e (stored 0%)
$> zipinfo my.zip
Archive:  my.zip   1428 bytes   11 files
-rw-r--r--  2.3 unx        0 bx stor 18-Feb-10 13:19 a
-rw-r--r--  2.3 unx        0 bx stor 18-Feb-10 13:19 b
drwxr-xr-x  2.3 unx        0 bx stor 18-Feb-10 13:21 dir1/
-rw-r--r--  2.3 unx        0 bx stor 18-Feb-10 13:20 dir1/d
-rw-r--r--  2.3 unx        0 bx stor 18-Feb-10 13:20 dir1/c
drwxr-xr-x  2.3 unx        0 bx stor 18-Feb-10 13:21 dir1/dir2/
-rw-r--r--  2.3 unx        0 bx stor 18-Feb-10 13:21 dir1/dir2/f
drwxr-xr-x  2.3 unx        0 bx stor 18-Feb-10 13:21 dir1/dir2/dir3/
-rw-r--r--  2.3 unx        0 bx stor 18-Feb-10 13:21 dir1/dir2/dir3/h
-rw-r--r--  2.3 unx        0 bx stor 18-Feb-10 13:21 dir1/dir2/dir3/g
-rw-r--r--  2.3 unx        0 bx stor 18-Feb-10 13:21 dir1/dir2/e
11 files, 0 bytes uncompressed, 0 bytes compressed:  0.0%

With your for loop seems nothing wrong too. Is it just a guess it is not showing deeper level contents or can you reproduce it on for example one of those 500 zip files?
 

10 More Discussions You Might Find Interesting

1. Solaris

RAID Levels

hi, what are the RAID Levels followed for various File systems ? thanks (3 Replies)
Discussion started by: sol8admin
3 Replies

2. Solaris

Init levels

I have a problem, i dont know if its a normal behaviour or not, i can go to a lower init level, but i cant go to a higher one again, for instance i can run the command init 2 while im at init 3 and when i do who -r i find myself go down to 2 but if i type init 3 and wait im still finding myself in... (1 Reply)
Discussion started by: XP_2600
1 Replies

3. UNIX for Dummies Questions & Answers

unzip .zip file and list the files included in the .zip archive

Hello, I am trying to return the name of the resulting file from a .zip archive file using unix unzip command. unzip c07212007.cef7081.zip Archive: c07212007.cef7081.zip SecureZIP for z/OS by PKWARE inflating: CEP/CEM7080/PPVBILL/PASS/G0063V00 I used the following command to unzip in... (5 Replies)
Discussion started by: oracledev
5 Replies

4. UNIX for Dummies Questions & Answers

How to search for a string within a zip

Hi Guys, We have some really large zip files containing hundreds of files, we need to search within these compressed files for a string in the filename eg ABC if found then extract the file from the zip ? I've searched for a long time but no joy Any help really appreciated Thanks ... (6 Replies)
Discussion started by: petef
6 Replies

5. AIX

ZIP multiple files and also specify size of zip file

I have to zip many pdf files and the size of zip file must not exceed 200 MB. When size is more than 200 MB then multiple zip files needs to be created. How we can achieve this in UNIX? I have tried ZIP utility but it takes a lot of time when we add individual pdfs by looping through a... (1 Reply)
Discussion started by: tom007
1 Replies

6. Solaris

Levels of support

Hello, I have a simple question because I can not find the information at oracle.com I want to buy support for OS Solaris and Servers hardware. I need information what are the levels of support and how much they cost? I need a help. Have a nice day (3 Replies)
Discussion started by: bieszczaders
3 Replies

7. UNIX for Dummies Questions & Answers

search for a string in zip file

Hi, I know gzcat helps grep for a string inside a file that has been zipped using gzip command. However, how can the same be achieved for files zipped using zip command and any other compression commands you may know off. Thanks, Mohtashim (5 Replies)
Discussion started by: mohtashims
5 Replies

8. Shell Programming and Scripting

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... (9 Replies)
Discussion started by: RAMA PULI
9 Replies

9. UNIX for Beginners Questions & Answers

How can we Zip multiple files created on the same date into one single zip file.?

Hi all i am very new to shell scripting and need some help from you to learn 1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder. 2)Post zipping... (2 Replies)
Discussion started by: b.saipriyanka
2 Replies

10. Shell Programming and Scripting

How can we Zip multiple files created on the same date into one single zip file.?

Hi all i am very new to shell scripting and need some help from you to learn 1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder. 2)Post zipping... (1 Reply)
Discussion started by: b.saipriyanka
1 Replies
LIBZIP(3)						     Library Functions Manual							 LIBZIP(3)

NAME
libzip - library for manipulating zip archives LIBRARY
libzip (-lzip) SYNOPSIS
#include <zip.h> DESCRIPTION
libzip is a library for reading, creating, and modifying zip archives. Below there are two sections listing functions: one for how to read from zip archives and one for how to create/modify them. READING ZIP ARCHIVES
open archive zip_open(3) zip_fdopen(3) find files zip_name_locate(3) read files zip_fopen(3) zip_fopen_encrypted(3) zip_fopen_index(3) zip_fopen_index_encrypted(3) zip_fread(3) zip_fclose(3) close archive zip_close(3) miscellaneous zip_stat(3) zip_get_archive_comment(3) zip_get_archive_flag(3) zip_get_file_comment(3) zip_get_name(3) zip_get_num_entries(3) zip_set_default_password(3) CREATING
/MODIFYING ZIP ARCHIVES create/open archive zip_open(3) add/change files and directories zip_add(3) zip_add_dir(3) zip_replace(3) zip_set_file_comment(3) zip_source_buffer(3) zip_source_file(3) zip_source_filep(3) zip_source_function(3) zip_source_zip(3) zip_source_free(3) rename files zip_rename(3) delete files zip_delete(3) revert changes zip_unchange(3) zip_unchange_all(3) zip_unchange_archive(3) close archive zip_close(3) miscellaneous zip_set_archive_comment(3) zip_set_archive_flag(3) ERROR HANDLING
zip_error_to_str(3) zip_strerror(3) zip_file_strerror(3) zip_error_get(3) zip_error_get_sys_type(3) zip_errors(3) AUTHORS
Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at> NiH February 14, 2011 LIBZIP(3)
All times are GMT -4. The time now is 09:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy