0
votes
1answer
42 views

Extract specific folder from a tar.gz

I know this question was previously asked on this site before like here 1 and here 2 but no success for me. I want to extract the Measures folder from my S012011_csv.tar.gz zipped file. If I do tar ...
1
vote
1answer
192 views

Creating a zip file with a timestamp

I have been trying to create a script which compresses a directory with a timestamp and move it to another location on the same server, but I cant seem to get TESTDATE to display on the zip file, ...
0
votes
1answer
60 views

Unix zip: zip multiple folders in to one zip file without creating a top containing folder

I have a folder like this: -resources --graphics --sounds I want to zip graphics and sounds folder into a .zip file named resources.zip, which I will use zip -r resources.zip graphics/ sounds/ ...
0
votes
1answer
541 views

how can I search for a string in a folder that has zip files also

I am trying to search a string in a folder "test". This folder has sub folders and zip files too. I want to search within this directory to find the match. I used zgrep '11:57' test zgrep '11:57' ...
5
votes
4answers
3k views

Is there a way to edit files inside of a zip file without explicitly extracting them first?

I sometimes need to make changes to a .zip or .jar file, so I usually move the file to /tmp, extract all the files with unzip, edit a few files, and then re-zip up the files. This works, but it can ...
0
votes
3answers
103 views

How to tar/zip a parent directory exculding a child direcory

I want tar a direcory which contains a number of child directories. But here my requirement is to tar the entire parent direcory excuding one child directory. Is there any command or procedure for ...
1
vote
0answers
94 views

repeat command until process start or timeout unix

Is there anyway to check the number of file in a directory, if the number of files is correct, say 5 files, zip the files with zip -r total.zip. If the number of files is wrong, wait 3 seconds, and ...
0
votes
3answers
368 views

What is the equivalent unix command to a Mac OSX “Compress” menu action?

When I right-click a file in Mac OSX and select "Compress 'File Name'", what is the equivalent bash or terminal command to get the same result? Is it just gzip -9 /path/to/filename?
1
vote
2answers
69 views

unix command zip everything except file ending with _fpartxx

I was wondering, if I have a folder structure like this: /var/www/testing/file1.iso_fpart0 /var/www/testing/file1.iso_fpart1 /var/www/testing/file1.iso_fpart2 /var/www/testing/file1.iso ...
1
vote
2answers
3k views

Compress files from OS X terminal?

In the Finder, there is this wonderful ability to right click on a file or directory, select compress from the drop-down, and end up with a zipped file. Is it possible to do the same thing from the ...
1
vote
2answers
121 views

Maintain zip file structure

I have a directory main_folder first_folder second_folder empty.txt another_folder another_empty.txt I want to zip second_folder, and I'm in main_folder, so I zipped with ...
0
votes
1answer
1k views

Unzip an archive that was split into 2 files

I have 2 zip files that were split using: zip -r -s 15 my_file.zip my_file.pdf Now I have 2 files: my_file.zip my_file.z01 How can I unzip them? Doing unzip my_file.zip I get: Archive: ...
3
votes
2answers
918 views

Linux: Specifying top level-directory when creating zip archive

I have project with the usual directory structure (src/, bin/, ...), i.e project-name/ |-- bin |-- lib |-- src `-- Makefile And would like to create an archive with the following directory ...
0
votes
2answers
2k views

Zip all files in a directory, but don't include the top directory in the archive

Can't quite figure out how to do this right. I have a folder with a website in /var/www I want to create a zip file with all of it, which when I decompress it does not include the top directory. In ...
12
votes
4answers
8k views

Unix zip directory but excluded specific subdirectories (and everything within them)

I'm trying to zip a directory (on Unix via SSH) but I need to exclude a couple of subdirectories (and all files and directories within them). So far I have this: zip -r myarchive.zip dir1 -x ...
4
votes
1answer
6k views

zip selected directories recursively in linux

I would like to zip only selected directories(and its child directories as well) I have many directories in the current folder like app, content, db, library etc. But I would like the zip only app ...
-1
votes
3answers
518 views

Unix zip command [duplicate]

Possible Duplicate: Zipping folders and their contents into a .zip file in Linux I need to zip a file on Unix machine. File is about 200MB. What is the best compression tool? and provide me ...
21
votes
7answers
30k views

Which is more efficient - tar or zip compression? What is the difference between tar and zip?

I'm working in Linux environment and want to know about tar and zip commands. Which is more efficient - tar or zip? I also need to know the differences between the tar and zip commands. Can anyone ...
20
votes
5answers
12k views

On Linux/Unix, does .tar.gz versus .zip matter?

Cross-platform programs are sometimes distributed as .tar.gz for the Unix version and .zip for the Windows version. This makes sense when the contents of each must be different. If, however, the ...
5
votes
3answers
29k views

Howto unzip “.xz” file with 7z and lzma

I tried to uncompressed a "*.xz" file with both 7z and lzma. But they gave me such message: $ 7z x myfile.fq.xz 7-Zip 4.57 Copyright (c) 1999-2007 Igor Pavlov 2007-12-06 p7zip Version 4.57 ...
1
vote
3answers
2k views

How to decompress the *.TGZ file without changing the orginal file? [duplicate]

Possible Duplicate: How do you gunzip a file and keep the .gz file ? I decompress the file using following command: gunzip -f test.TGZ This gave me test.tar file but I lost the test.TGZ ...
18
votes
4answers
14k views

tar – extract discarding directory structure

unzip has a nifty option -j, whereby the directory structure of the archive is discarded, and all files are extracted into the same directory. Is there a way of making tar work in the same way? ...
3
votes
1answer
611 views

Importing to mysql from a .gz via shell - how to do it without extracting to a file? [duplicate]

Possible Duplicate: Pipe gunzip and mysql to gunzip a dump and import it i have a .gz file of an sql dump. at the moment i extract it to its own file (ie dump.sql.gz extracted to dump.sql) ...