Zip is a file format used for data compression and archiving.
0
votes
0answers
33 views
zip command is failing during high memory usage
We have several perl scripts, which generates and emails reports. The script that emails the files expects a .zip extension. The report scripts generates a .txt or .xls file and then runs the ...
0
votes
1answer
12 views
Pass list of folders to zip command
I have a folder which contains lot's of folders in it.
I don't need to zip all of them and I have a list of folders that need to be zipped in a separate file
The folder list is in the following ...
5
votes
2answers
132 views
How to zip a file and save it in another directory
How can I zip a file and save it in another directory using the command line? I have no space left in directory (100% full).
0
votes
0answers
23 views
Error unzipping file through ksh, unzip works through bash
I have an auto-generated zipfile foo.zip on a Red Hat server that needs to be extracted to a particular location /bar. This is done through an install script using ksh. When the script executes unzip ...
0
votes
1answer
39 views
Error when unzipping a file
I am getting the following error when unzipping a file
unzip user_file_batch1.csv.zip
Archive: user_file_batch1.csv
End-of-central-directory signature not found. Either this file is not
a ...
1
vote
1answer
131 views
How can I ignore “zip warning: name not matched” when using zip command with -d option?
I am creating an sh file to run multiple commands in the background.
At some line in this file, there is a command to update a zip file like:
zip -d archive.zip file.txt
This file.txt might not be ...
4
votes
3answers
116 views
Bash: Zipping/grouping files by common substring
I have about 100 files.
They are named like this.
3000_ABCD_XXXXXXX.csv
3000_ABCD_YYYYYYY.csv
3000_ABCD_XYXYZYZ.csv
3000_EFGH_XXXXXXX.csv
3000_EFGH_YYYYYYY.csv
3000_EFGH_XYXYZYZ.csv
...
0
votes
1answer
20 views
Working with the option -x in zip
I can't manage to figure out the -x option in the command zip.
I want to compress a working folder to save it as a backup, but I have some files and a directory that contains huge files that I don't ...
2
votes
1answer
55 views
Can p7zip create smaller zip files than winzip?
7-Zip for Windows creates smaller zip archives than WinZip, so presumably P7zip can create smaller zip archives than Zip in Linux. So how do I create zip files using P7zip in Linux?
2
votes
1answer
31 views
How to list files in a zip without extra information
en I use unzip -l test.zip I get the output like this:
Archive: test.zip
Length Date Time Name
--------- ---------- ----- ----
810000 05-07-2014 15:09 file1.txt
810000 ...
-1
votes
2answers
70 views
Sending zip file containing plain txt file via email
How to send a plain txt file in a zip file via email in unix? The contents in the txt file should be word wrap.
2
votes
3answers
50 views
How to know the path to a specific file in a zip archive, without extracting it?
I only know the filename but not its exact location. I would like to extract only that file from the archive. And I need to know its location in the archive.
6
votes
4answers
294 views
How to only zip the files of a specific user?
I like zip, it's simple, but recently I came with the need of only zipping the file owned by one user in a directory.
I read the manual and I can't find any option to for example do things like:
...
2
votes
2answers
87 views
Compress zip files with higher compression
I have a large number of zip files that were compressed using the zip command. I would like to recompress them with the -9 flag to improve the compression ratio. Does anyone know if that can be done ...
0
votes
2answers
314 views
Unzipping error
When I enter unzip ../founation-latest.zip, it outputs this:
warning [../foundation-latest.zip]: 248 extra bytes at beginning or within zipfile (attempting to process anyway)
The file is 138KB. ...
0
votes
1answer
449 views
Depsolving for php-pecl-zip
I'm having trouble getting rid of my depsolving errors, and I've been left to figure this one out on my own. It all started when I wanted to upgrade from PHP 5.2 to PHP 5.3 (heaven forbid), and I was ...
1
vote
2answers
123 views
Text substitution inside compressed files
I have several zip files, each one having several text files inside them.
I want to substitute all occurrences of a in these text files with b, and leave them zipped with the same structure.
If I ...
2
votes
1answer
123 views
Find & Delete directories in .zip files
Question 1 : In many .zip archive files I would like to delete directories anwsering to a name pattern.
In a "normal" directory I used :
find . -type d -name "pattern" -mtime +30| xargs rm -r
Is ...
0
votes
1answer
60 views
Order a list of files, by date modified, then unzip them in that order
I have a list of zip files, that must be extracted by date modified, they contain updated images and the strange way the local mls provides them means that newer zip files container newer versions of ...
3
votes
4answers
729 views
How to zip recursively all subdirectories that only contain text files
I have a backup from a disk that contains data files and analysis. The dir structure and names are not really consistent. To save space, I would like to zip all the subdirs that only contain data ...
2
votes
1answer
102 views
tar.bz2 7zip selective extract prformance
We use tar.bz2 as our archive of server logs. We also write tools that selectively parse these archived logs. Many times I must regex-search one file’s lines in the archive to determine if other ...
2
votes
2answers
109 views
How to use `expect` with `zipcloak`?
I create a zip file using zip which includes several files and directories, named test.upd. Now I want to use expect to automatically handle the password encryption. Here are two bash scripts, both do ...
2
votes
1answer
268 views
Facility on AIX to ZIP a list of files
I'm working with an external company who is using AIX (version unknown) as their platform. They are required to FTP me a ZIP file containing multiple files.
Does the UNIX utility zip exist on a ...
0
votes
3answers
191 views
unzip a directory in unix [closed]
I tried to unzip a folder in Unix:
$ unzip sample.zip
This is creating the root structure a/b/c/d/e/f/sample.
Please advise. I need to unzip a folder in the current directory.
3
votes
2answers
234 views
Create Zip for each subfolder but containing only matched files
I am trying to figure out how to create a zip file for each subfolder containing only files that match my criteria.
For instance I have:
Folder1
Folder2
Folder3
Each folder contains the same set ...
1
vote
1answer
409 views
extract only a specific folder Contents from a zipped archive to a given directory [duplicate]
This is very close to the SO How to extract only a specific folder from a zipped archive to a given directory? I need something close but I always get the folder with the contents, not it's contents ...
1
vote
2answers
385 views
Having trouble uncompressing a few files [duplicate]
So I have to uncompress 4 different files. When I do
file file1
file file2
file file3
file file4
for example, different messages are displayed. For example one starts like "gzip compressed data, ...
2
votes
3answers
162 views
zip a directory that name start with `-` [duplicate]
How can I zip a directory like -foo?
$ zip "-foo" "-foo" shows only help page.
I think -foo is recognized as a options, but I don't know how to solve it.
8
votes
1answer
250 views
Do any archive utilities exist that can preserve the date created file attribute on NTFS-3G?
I tried the -X switch on zip, but that did not save the date created attribute. I can get it using this method. When a file is added to a zip archive using 7-Zip, it preserves the date created and ...
3
votes
3answers
2k views
speed up gzip compression
Is it possible to speed up the gzip process?
I'm using
mysqldump "$database_name" | gzip > $BACKUP_DIR/$database_name.sql.gz
to backup a database into a directory, $BACKUP_DIR.
the manpage ...
0
votes
1answer
183 views
Does zip's -u flag pay attention to deleted files?
This website about Linux's zip utility says this about the -u flag:
Replace (update) an existing entry in the zip archive only if it has been modified more recently than the version already in the ...
2
votes
2answers
500 views
Zip folder without including path to folder and require only one argument
I'm trying to make a zip function that'll do all the steps I typically do when zipping a file or folder. Say my current directory is ~, and I want to zip a folder named Folder1, whose file path is ...
2
votes
2answers
210 views
Junk a part of the directory with unzip?
A zipfile f.zip contains a bunch of files all with directories.
A/B
A/B/C
A/B/C/D
..
A/B/C/D/and/some/more/dirs
A/B2
Now I'm only interested in the tree below C/D. I can do unzip f.zip */D/* ...
0
votes
3answers
343 views
High CPU utilization with zip command
When I am using the zip utility in Linux to compress files, CPU utilization is going to 100%.
Can anybody help me why CPU utilization is so high?
I'm using the command:
zip file_name *.xml
3
votes
4answers
909 views
Change working directory
I'm trying to compress a directory at
/home/cyrus/sql
And I wanted to change the working directory when zipping the folder:
/ $ zip -b /home/cyrus sql.zip /home/cyrus/sql
But when I check the ...
6
votes
2answers
731 views
Add a file to a different path in a zip file
I have a file that placed in the following directory:
folder_A/another_folder_A/file_to_add.xml
Now, what I want to do is simply add the file to a folder in an existing zip archive.
For example ...
0
votes
3answers
1k views
How to get extract/compress option on right clicking?
I am using Linux Mint 14 Nadia . Earlier whenever I right clicked any folder I got options like Extract it, Compress etc. But now I am not getting them . Probably I changed/deleted some of the ...
2
votes
1answer
2k views
Unzip file contents, but without creating archive folder
I have a file myarchive.zip that contains many directories, files, etc. Let's say this myarchive.zip file lives in a directory called "b". Well, when I use the "unzip myarchive.zip" command, the ...
2
votes
2answers
203 views
What scripting language can I use to automate a concatenation & zipping process?
For a project I'm doing I need to concatenate and compress (with zip) many (midi) files and compare their sizes. I've thought there must be some language that allows me to do something like this:
...
4
votes
4answers
477 views
unzip file, which directory was created?
Objective:
After expanding archive a.zip by using command unzip on Ubuntu 12.10, assign the name of the folder a.zip expanded to to bash variable v.
a.zip is assumed and guaranteed to expand to a ...
3
votes
1answer
623 views
Encoding of a zip file
When I extract some file (mp3) with japanese or korean characters within its filename on Windows, they appear normally, but when I extract it on Linux (Ubuntu/Mint) they appear as something like this
...
6
votes
1answer
7k views
command to zip multiple directories into individual zip files
I have a single directory that contains dozens of directories inside of it.
I'm new to command line and I'm struggling to come up with a command that will zip each sub-directory into a unique ...
1
vote
1answer
1k views
How can I zip the contents of current directory minus all hidden files?
How can I zip up the contents (excluding hidden files and folders) of the folder I am currently in?
zip -r extension.xpi . -x "*/.*"
This is what I have so far, but I am still getting hidden files.
...
3
votes
4answers
310 views
Create directory if zip archive contains several files
If an archive contains several files in the root directory, I'd like to create
a directory named after the file name (without extension). If an archive
contains just a directory, then I'd like to ...
6
votes
2answers
682 views
How can I create a zip file v2.0?
How can I create a zip file v2.0?
It seems OpenDocument files are zip files v2.0:
$ file foo.odt
foo.odt: OpenDocument Text
$ hexdump -C -n 16 foo.odt
00000000 50 4b 03 04 14 00 00 08 00 00 03 0d ...
4
votes
3answers
264 views
How to tell if a file is being downloaded by wget?
I use wget to download files (most are zip files) automatically for me during the night.
However, sometimes in the morning I find that a few files cannot be unzipped. I don't know why this is ...
6
votes
2answers
1k views
Add file to deep inside a zip file
Say I want to add the file file.txt to foo.zip, I could just do zip -u foo.zip file.txt.
However inside the zip-file there already exist a folder with the path foo.zip/very/many/paths/ (relatively to ...
6
votes
2answers
4k views
How to extract only a specific folder from a zipped archive to a given directory?
How does one extract a specific folder from a zipped archive to a given directory?
I tried using
unzip "/path/to/archive.zip" "in/archive/folder/" -d "/path/to/unzip/to"
but that only creates the ...
6
votes
1answer
498 views
Unzipping certain archives works on Windows but not on Linux
I've asked a few people and just thought about asking it here. We get sent files from an international company for design work in a zip format. Well when I run a script to unzip the files in the ...
2
votes
3answers
197 views
Zip output formatting
I'm learning zip and I have run into something I cannot figure out in man zip. When I run zip -r $folder $folder it will correctly zip all contents but the zip contents is as follows:
zip
|-folder
...







