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)
I am trying to upload .zip files to Unix server and get the error 553 qmerev2002.zip: Permission denied, what is my problem?? I am able to load other files and folders fine. (3 Replies)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
Hello,
Our system on a Redhat platform is generating ZIP archives that we then send to another system on a Windows machine. I have no issue generating a ZIP file containing up to 2GB worth of data and 350k files, I can unzip all contents on the machine with no issue, however the remote system on... (4 Replies)
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)