Zip is a file format used for data compression and archiving.
9
votes
5answers
973 views
How to de-unzip, de-tar -xvf — de-unarchive in a messy folder?
Usually, I unarchive things by $ mkdir newFolder; $ mv *.zip newFolder; $ cd newFolder; $unzip *.zip but sometimes I get lazy and just do in an arbitrary folder $ unzip *.zip so time-to-time messing ...
9
votes
3answers
12k views
How to unzip a multipart (spanned) ZIP on Linux?
I need to upload a 400mb file to my web server, but I'm limited to 200mb uploads. My host suggested I use a spanned archive, which I've never done on Linux.
I created a test in its own folder, ...
8
votes
1answer
1k views
The zip format's external file attribute
This is a slightly exotic question, but there doesn't seem to be much information on the net about this. I just added an answer to a question about the zip format's external file attribute. As you can ...
6
votes
6answers
31k views
How do I zip/unzip on the unix command line?
How can I create and extract zip archives from the command line?
6
votes
1answer
6k views
How do you extract a single folder from a large tar.gz archive?
I am using this command on a 5GB archive
tar -zxvf archive.tar.gz /folder/in/archive
is this the correct way to do this? It seems to be taking forever with no command line output...
6
votes
2answers
293 views
Remove accidentally extracted files [duplicate]
Possible Duplicate:
How to de-unzip, de-tar -xvf — de-unarchive in a messy folder?
This is a pretty annoying occurrence. Sometimes, I download an archive (tar.gz, tar.bz2, zip, rar, ...
6
votes
2answers
241 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 ...
6
votes
1answer
2k views
How can I force unzip / zip not to create a subdirectory when I extract it?
Depending on how a zip file is created, sometimes it will extract all of the files directly, and sometimes it will extract the files into a subdirectory.
If the latter is true, how can I force the ...
5
votes
4answers
1k views
Copy a File From One Zip to Another?
I have a file named 'sourceZip.zip'
This file ('sourceZip.zip') contains two files:
'textFile.txt'
'binFile.bin'
I also have a file named 'targetZip.zip'
This file ('targetZip.zip') contains ...
5
votes
1answer
161 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 ...
5
votes
0answers
307 views
Issue with internationally zipped files
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 ...
4
votes
3answers
341 views
Is there a command to list the compressed file sizes for files within a .zip file?
I'd like to see the absolute size in bytes of each file that has been compressed into single zip file. Having read the zip man page, I'm not sure that that utility can do it. This is on Mac OS X.
...
4
votes
3answers
6k views
Searching for a string on multiple zip files.
I have a folder that contains about 200 zip files. Each zip file contains only one text file in it.
I would like to search for a specific string in all the text files in all the zip files.
I tried ...
4
votes
3answers
2k views
Is it possible in unix to search inside zip files
I have 100s of directories and within those I have a few zip files. Now there are images named abc.jpg in those zip files. The zip files may be in any folder or in any subfolder so its difficult to ...
4
votes
3answers
108 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 ...
4
votes
3answers
329 views
How can I list all *.doc files in a Zip archive, including files in subdirectories?
I have Zip files, that might look like this:
$ zipinfo -1 zip.zip
doc.doc
dotx.dotx
xls.xls
ppt.ppt
txt.txt
c.c
subdir/subdir2/doc.doc
subdir/xls.xls
subdir/ppt.ppt
subdir/c.c
subdir/txt.txt
...
4
votes
1answer
367 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 ...
4
votes
1answer
287 views
Find recursively all archive files of diverse archive formats and search them for file name patterns
At best I would like to have a call like this:
$searchtool /path/to/search/ -contained-file-name "*vacation*jpg"
... so that this tool
does a recursive scan of the given path
takes all files with ...
3
votes
3answers
235 views
Setting execution right to whole directory - is it good or bad idea?
I have a zip file containing lot of files and directories for a certain application which should be running on Linux. Some files needs to be set as executable, but the zip file format afaik does not ...
3
votes
4answers
78 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 ...
3
votes
3answers
120 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 ...
3
votes
2answers
695 views
How do I create a ZIP archive that preserves only the structure of the target directory and below?
I need to create a zip archive where the unzipped result preserves the directory structure from the specified directory down. I also need to do this without actually switching to the directory.
My ...
3
votes
2answers
200 views
Linux Need Basic Libraries Without Internet
So I've been battling with my debian install lately, it doesn't have the firmware for either eth0 or wan0 NIC's. However, I got a firmware.zip file that I need to extract to /lib/firmware. The problem ...
3
votes
2answers
4k views
Excluding a directory when zipping files
I've got a bash script that does something like this:
zip -0 ../backup/backup.zip \
-r ./* \
-x \*CVS\* \
-x *Thumbs.db* \
The directory it's backing up is a SVN archive (it used to be CVS back in ...
3
votes
1answer
3k views
Zip everything in current directory
I'd like to compress and package everything, including files and folders in current directory, into a single ZIP file on Ubuntu.
What would be the most convenient command for this (and name of the ...
3
votes
2answers
349 views
Search for files with a specific size inside recursive zipped archives
I have a folder with several files. These files are either .xml or .zip files.
These .zip files contain .xml and/or .zip files. These .zip contains also .xml or .zip, and so on... until we finally ...
3
votes
4answers
96 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
111 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
...
3
votes
0answers
336 views
ZIP password finders for Linux?
I'm trying to extract ZIP files for an encrypted archive I've forgotten the password for. So far I've found the tool fcrackzip which does what I want, but its own manpage states that it has numerous ...
2
votes
2answers
7k views
Extract only a specific file from a zipped archive to a given directory
I need to pull a single file from a ZIP file which I know the path to. Is there a command like the following:
unzip -d . myarchive.zip path/to/zipped/file.txt
Unfortunately, the above command ...
2
votes
2answers
84 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:
...
2
votes
1answer
513 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 ...
2
votes
2answers
98 views
Zipping files two by two
I have a directory that has 800 files like this:
file1.png
file1@2x.png
file2.png
file2@2x.png
file3.png
file3@2x.png
... etc
I need to create zip files like this
file1.zip (containing ...
2
votes
1answer
855 views
How to zip individual files from different directories in one line?
I want to zip numerous files from different directories(paths) in one line. How can I do that?
2
votes
1answer
172 views
unzip two different kind of file extensions
Note here, .zip and .jar is just an example, my file extensions are different. Suppose I have a directory which can contain number of zip files
a.zip b.zip c.zip
AND/OR
z.jar x.jar y.jar
along ...
2
votes
3answers
542 views
Zip contents of some subfolders but not others
I would like to use the unix zip command to zip a directory. Let's say the directory is structured as follows:
dir1/
dir1/dir2/
dir1/dir2/file1
dir1/dir2/file2
dir1/dir3
dir1/dir3/file1
dir1/file1
...
2
votes
2answers
192 views
How do I find corrupted archive files?
I have a lot of zip files. Some are not downloaded correctly and are corrupted. I want to remove them.
Is there a way to find the corrupted archives in bash?
2
votes
2answers
199 views
Unzip to location
I am using unzip through putty and it works ok.
However, using the same command through a .NET C# SSH library (Renci.SshNet) gives different results.
SshClient s = new SshClient("ssh_host", ...
2
votes
2answers
327 views
Help with unzipping a .dd.gz, possibly corrupted
I recieved this file that I was told was a copy of a hard drive (or disk). The file is "sheeva-mem.dd.gz". I tried to unzip the file in a linux Fedora machine. This yielded "unexpected end of file". ...
2
votes
1answer
2k views
Find a file in lots of zip files (like find command for directories) [duplicate]
Possible Duplicate:
Find recursively all archive files of diverse archive formats and search them for file name patterns
I need to search for a file in all zip files in a directory.
Is ...
2
votes
3answers
140 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
...
2
votes
2answers
273 views
Possible to get “old” time stamp behaviour?
When downloading a file or e.g. unzipping one, the time stamp is not set to when the file appeared on my harddisk, which is what I want.
See this example
~$ wget ...
2
votes
1answer
200 views
referring to files inside a jar or zip files in Linux
I am wondering if I can refer to files inside JAR or ZIP files using URLs. I mean, without using a tool (such as the Java Jar utility) but just at the operative system level.
For example, if I have a ...
2
votes
2answers
780 views
How to create multiple zips from a directory containing a million xml files?
I have a directory containing million xml files.
I want to create multiple zip files containing n number of xml files. For ex: if n = 10000, then I want to create 100 zip files i.e. each zip file will ...
2
votes
2answers
86 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 ...
1
vote
3answers
183 views
Is it possible to run shell commands inside zip files?
Is it possible to run a shell script inside a zip folder in Linux? I have a shell script that is saved inside a zip folder, and I'd like to run the shell script inside the zip file (as if the zip file ...
1
vote
1answer
196 views
How can I view files in zip using putty?
I want to view file list in zip archive using putty without unzip the archive.
Is it possible?
1
vote
1answer
4k views
unzip to a specific folder
I want to unzip the contents of a zipfile called mine.zip into /yours/ but when I do it using the -d flag it keeps going into /your/crap/ etc which is not I want
Is there a way to do this?
1
vote
1answer
137 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.
...
1
vote
1answer
141 views
How to unzip a directory inside a zip file
I want to unzip a certail directory inside a zip file using the following command:
unzip -oq vqmodmanager.zip upload -d temp/
But the system gives the following error:
caution: filename not ...
