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)
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)
Hi,
I need to zip a .dat file with .zip extension. I tried using the "zip" command. But shell says. "ksh: zip: not found"
Currently I am using gunzip to zip and changing the extension ".gz" to ".zip" as follows.
mv $file `echo $file | sed 's/\(.*\.\)gz/\1zip/'`
But when I tried... (1 Reply)
I've a zip file called Z00.zip and in that file there are 22 more zip files. Each zip file having .txt files nearly 10,000 files. I am trying to unzip all these .txt files in one command line to unzip each .zip file from Z00.zip file. Would like to know whether possible to unzip all sub-zip files... (1 Reply)
Hi,
I'm new to scripting. I need to find all the 10 files in the source directory and then archieve them to archive directory.
The source files which im getting does not have any extensions just binary files.
I need to find them by the file names and archive it. Directory also contains other... (1 Reply)
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)
Hi All,
I want to fetch the files based on .done file and display the .csv files and Wil take .csv files for processing.
1.I need to display the .done files from the directory.
2.next i need to search for the .Csv files based on .done file.then move .csv files for the one directory
... (2 Replies)
I have a specific set (all ending with .bam) of downloaded files in a directory /home/cmccabe/Desktop/NGS/API/2-15-2016. What I am trying to do is use a match to $2 in name to rename the downloaded files. To make things a more involved the date of the folder is unique and in the header of name... (1 Reply)
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)
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
LEARN ABOUT DEBIAN
zip_replace
ZIP_ADD(3) Library Functions Manual ZIP_ADD(3)NAME
zip_add , - .Nm zip_replace add file to zip archive or replace file in zip archive
LIBRARY
libzip (-lzip)
SYNOPSIS
#include <zip.h>
zip_int64_t zip_add(struct zip *archive, const char *name); "struct zip_source *source"
int zip_replace(struct zip *archive, zip_uint64_t index); "struct zip_source *source"
DESCRIPTION
The function zip_add adds a file to a zip archive, while zip_replace replaces an existing file in a zip archive. The argument archive
specifies the zip archive to which the file should be added. name is the file's name in the zip archive (for zip_add ), while index speci-
fies which file should be replaced (for zip_replace ). The data is obtained from the source argument. See the zip_source_* functions
cited in SEE ALSO.
RETURN VALUES
Upon successful completion, zip_add returns the index of the new file in the archive, and zip_replace returns 0. Otherwise, -1 is returned
and the error code in archive is set to indicate the error.
EXAMPLES
struct zip_source *s;
if ((s=zip_source_buffer(archive, buffer, len)) == NULL ||
zip_add(archive, name, s) 0) {
zip_source_free(s);
printf("error adding file: %s0, zip_strerror(archive)); }
ERRORS
zip_add and zip_replace fail if:
[ZIP_ER_EXISTS]
There is already a file called name in the archive. (Only applies to zip_add ).
[ZIP_ER_INVAL]
source or name are NULL, or index is invalid.
[ZIP_ER_MEMORY]
Required memory could not be allocated.
SEE ALSO libzip(3), zip_source_file(3), zip_source_filep(3), zip_source_function(3), zip_source_zip(3)AUTHORS
Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
NiH March 10, 2009 ZIP_ADD(3)