0
votes
3answers
33 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
40 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
54 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
35 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 ...
0
votes
2answers
200 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
84 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
593 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: ...
2
votes
2answers
386 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
1answer
1k 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 ...
5
votes
3answers
2k 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
3k 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
346 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 ...
14
votes
6answers
17k 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 ...
10
votes
5answers
6k 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 ...
4
votes
3answers
24k 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 ...
13
votes
4answers
8k 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
520 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) ...