Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

libzip(3) [debian man page]

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)

Check Out this Related Man Page

ZIP_FDOPEN(3)						     Library Functions Manual						     ZIP_FDOPEN(3)

NAME
zip_fdopen - open zip archive using open file descriptor LIBRARY
libzip (-lzip) SYNOPSIS
#include <zip.h> struct zip * zip_fdopen(int fd, int flags, int *errorp); DESCRIPTION
The zip archive specified by the open file descriptor fd is opened and a pointer to a struct zip, used to manipulate the archive, is returned. In contrast to zip_open(3), using the archive can only be opened in read-only mode. The fd argument may not be used any longer after calling The are specified by or'ing the following values, or 0 for none of them. ZIP_CHECKCONS Perform additional consistency checks on the archive, and error if they fail. If an error occurs and errorp is it will be set to the corresponding error code. RETURN VALUES
Upon successful completion zip_fdopen returns a struct zip pointer, and fd should not be used any longer, nor passed to close(2). Otherwise, NULL is returned and *errorp is set to indi- cate the error. In the error case, fd remains unchanged. ERRORS
The file specified by fd is prepared for use by libzip(3) unless: [ZIP_ER_INCONS] Inconsistencies were found in the file specified by path and ZIP_CHECKCONS was specified. [ZIP_ER_INVAL] The flags argument is invalid. Not all zip_open(3) flags are allowed for see DESCRIPTION. [ZIP_ER_MEMORY] Required memory could not be allocated. [ZIP_ER_NOZIP] The file specified by fd is not a zip archive. [ZIP_ER_OPEN] The file specified by fd could not be prepared for use by libzip(3). [ZIP_ER_READ] A read error occurred; see for details. [ZIP_ER_SEEK] The file specified by fd does not allow seeks. SEE ALSO
libzip(3), zip_close(3), zip_error_to_str(3), zip_open(3) AUTHORS
Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at> NiH February 1, 2010 ZIP_FDOPEN(3)
Man Page

15 More Discussions You Might Find Interesting

1. SCO

Trying to create a self extracting file

Hi, I'm trying to create a self extracting zip file on a SCO box. On other platforms(Linux, Solaris, AIX, etc) I have accomplished creating this file using InfoZip and Unzip. I create the zip file, prepend the unzipsfx stub that comes with Unzip, and then use the zip -A option to adjust the... (2 Replies)
Discussion started by: twynn
2 Replies

2. Shell Programming and Scripting

Help on zip

if you have a file that is zipped and has various files within can you add a file to this at all? i.e. ZIP folder called logs.zip - contains files zip1, zip2, zip3 need to add build.zip (contains file zip4) to logs.zip so logs.zip will now look like this - zip1.zip2.zip3,zip4? can this be... (2 Replies)
Discussion started by: Pablo_beezo
2 Replies

3. UNIX for Dummies Questions & Answers

to open .zip file on a server

I want to open a file with .zip format on a remote server. How willi do that thanks (4 Replies)
Discussion started by: supercops
4 Replies

4. Shell Programming and Scripting

Need to zip the files date wise --urgent Help needed

Hi all, this is my first post, i need to write a script to zip the files with datewise below are the log files. -rw------- 1 root sso 85316156 May 24 22:11 core_test_smservaz_104_104_1243217459_8896 -rw------- 1 root sso 90413304 May 25 22:12 core_test_smservaz_104_104_1243303895_20912... (4 Replies)
Discussion started by: lcschandu
4 Replies

5. UNIX for Dummies Questions & Answers

Search through 2 levels of zip

Hi guys, I know I'm missing something simple here. We have about 500 zipped files in a directory which contain more zip files and within those I need to find a file without unzipping everything. I know I can use zipinfo which I'm trying to create a for loop to go through the files and... (4 Replies)
Discussion started by: petef
4 Replies

6. Shell Programming and Scripting

Find and rename long file names (html)

Hi Guys, I need a help. I have 1130 zip files. Each one of them has files including 1 html file with long file name (includes special charactors, Alphabetic and numbers). I have copied all 1130 zip files to my linux system and extracted using below command. Find . -name "*.zip" -exec... (7 Replies)
Discussion started by: Rajmani
7 Replies

7. Shell Programming and Scripting

Script to rename zip-files with name of file

Hi, I'm desperately in search for a solution of the following problem: I have a directory full of zip-files. All these zip-files contain a single file with a name that should be used for the name of the zip-container. Anybody a good idea. I'm an absolute beginner in shell scripting - so please... (7 Replies)
Discussion started by: mark_a17
7 Replies

8. Shell Programming and Scripting

Find and zip the files

Can anyone help me to find the files which are 5 days old and zip them with uniq filename in a single cmd. This needs to be done for every 5 days. for example; listing the files find .-mtime +5 -exec ls -lrt {} \; (3 Replies)
Discussion started by: zooby
3 Replies

9. UNIX for Advanced & Expert Users

How to zip/tar millions of files?

Hi guys, I have an issue processing a large amount of files. I have around 5 million files (some of them are actually directories) in a server. I am unable to find out the exact number of files since it's taking "forever" to finish (See this thread for more on the issue). Anyway, now I... (6 Replies)
Discussion started by: verdepollo
6 Replies

10. Shell Programming and Scripting

cowardly refusing to create an empty archive

Hi, I am trying to write an Archive script that should look for files older than x days, zip them and move the zip to the archive directory and delete the files that have been zipped. I am not sure how i can handle this error: "cowardly refusing to create an empty archieve". Just wanted to know... (9 Replies)
Discussion started by: stunnerz_84
9 Replies

11. Shell Programming and Scripting

Help with zipping files in multiple directories

I'm trying to zip multiple files from within certain directories which are named out. find . -name "*_out -print | xargs zip * I get this error : A file or directory in the path name does not exist how do I get this to work from within my KSH script? (2 Replies)
Discussion started by: Bperl1967
2 Replies

12. Shell Programming and Scripting

create a zip file

Im fairly new to bash but I wanted to know about an idea I had to stream my file process these days. I modify .html, and .xml files and usually will take the files right click, create .zip, add files, rename, and cut the zip out of the folder and paste into another folder. I KNOW bash should be... (13 Replies)
Discussion started by: graphicsman
13 Replies

13. Shell Programming and Scripting

Finding a text file from a group of zip files without unzipping

HI , There are more than 100 zip files in a directory and i wanted to see if there is a max1157.txt file in any of the zip files without actually unzipping them. Could you please help. Thanks in Advance. Karthik. (6 Replies)
Discussion started by: karthikk0508
6 Replies

14. Shell Programming and Scripting

Renaming unzipped files with name of archive

I am attempting to rename files within a zipped archive with the beginning of the name of the zip file. For example unzip AAA_000.zip and rename file1.csv, file2.txt to AAA_file1.csv, AAA_file2.txt. I am able to do this for a zip file with one file inside, but not for multiple files. This is... (2 Replies)
Discussion started by: lcp
2 Replies

15. Shell Programming and Scripting

Grabing the same timestamp from files that are ZIPPED

Hi, I am zipping more than 20 files that has same timestamp in all of them. I need to create the zip file with the same timestamp as in the files that are zipped. So I have files: Dummytest_20140601W110515_file1.txt Dummytest_20140601W110515_file2.txt ....... .......... (5 Replies)
Discussion started by: Saanvi1
5 Replies