12-02-2008
@nohup
No. It will not get extracted when using "unzip -p" option.
It'll fetch the contents alone without extracting. I tried it.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
If a zip file contains several zip files, but if the file names of the files needed are known, is there a variation of the unzip command that will allow those few (individual) files to be extracted?
---
Example:
Zip file name: zip.zip
unzip -l zip.zip will display file01, file02, file03, etc.... (1 Reply)
Discussion started by: HLee1981
1 Replies
2. AIX
Hello everyone,
I have a script that pulls a text file out of a zip archive and updates the file. What I need to do is put it back in the zip archive and replace the old one, but I am having no luck.
Everything I search on forums or internet points to the command zip, that command is not... (6 Replies)
Discussion started by: dbridle
6 Replies
3. UNIX for Dummies Questions & Answers
Can I extract files from an archive file (tar), where the filename includes the full directory path, to a different directory?
For example the archive files may have a filename of
/SrcFiles/XXX/filename.dat
and I want to extract it to /SrcFiles/YYY/filename.dat. Since the archive file was... (1 Reply)
Discussion started by: nmalencia
1 Replies
4. UNIX for Dummies Questions & Answers
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
5. UNIX for Dummies Questions & Answers
Hi,
How could compress a file with a specific name. For example if I put the following:
gzip -f file.dat
I compressed it with the same file name to compress, "file.dat.gz". How could compress it with the name I want for example test.gz.
Thanks. (4 Replies)
Discussion started by: pepeli30
4 Replies
6. Shell Programming and Scripting
Hi there,
I have one huge archive (it's a system image).
I need sometime to create smaller archives with only one or two file from my big archive.
So I'm looking for a command that extracts files from an archive and pipe them to another one.
I tried the following :
tar -xzOf oldarchive.tgz... (5 Replies)
Discussion started by: chebarbudo
5 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Hi there,
I wish to create a single .tar file of the current directory but have literally no idea on where to... (8 Replies)
Discussion started by: Banned
8 Replies
8. Shell Programming and Scripting
Hi all,
i've got the following problem:
We've got a shell-script, that creates some different files based on several criteria given, using a sql-script.
After creating, those files are individually zipped and stored, then sent to a ftp-server.
This is all working since 2010, but now they have... (3 Replies)
Discussion started by: Biggreuda
3 Replies
9. Shell Programming and Scripting
Hi all,
I need to do a grep in a specific file inside multiple (tar.gz) archives.
I know zgrep can grep in an archive, but as far as I know, I can't supply a specific filename from inside the archive to grep in.
Is there any other way do to this, besides extracting it and then... (1 Reply)
Discussion started by: Subbeh
1 Replies
10. UNIX for Beginners Questions & Answers
hello
i wish to write the result of these below conditions in a file:
1. in a specific folder, i have many tar.gz files.
2. each tar.gz file contains ".dat" file in sub folders.
3. i wish to get the full path of these .dat files, if i find in it a specific word ("ERROR24").
4. all this... (6 Replies)
Discussion started by: jimmyjames9
6 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)