0
votes
1answer
30 views

Concatenate header of one file with tail of another

I have a large gzipped mysqldump file which contains some table definitions and then many insert statements. I'd like to edit the table definitions but leave the insert statements alone. The file is ...
0
votes
1answer
17 views

Copying Jar files into single zip file

I am trying to compress the hundreds of jar files into a single zip file that can be transferred to a different location. Please help.
2
votes
1answer
1k views

How can I get the uncompressed size of gzip file without actually decompressing it?

Please find my OS details: $ uname -a AIX xxyy 1 6 000145364C00 I've tried the following command to get size of a file in gzip archive: $ gzip -l mycontent.DAT.Gz compressed uncompr. ratio ...
0
votes
3answers
375 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?
2
votes
1answer
170 views

UNIX shell command to expand files of any compressed type

Is there any UNIX shell command to expand a compressed file which type is not known in advance? I should be able to use this command to expand at least any of the following types of files, though the ...
2
votes
3answers
2k views

gzip change file ownership

Here is a case i don't understand i have a group 'bar', and this group has two users; 'foo' and 'bar'. I have a test.txt file, 'foo' is the owner and 'bar' user only can read it. However, if 'bar' ...
1
vote
2answers
358 views

Did gzip destroy my log file?

I had a rather big log file. So I thought I'd gzip it before transferring it to my pc. I did gzip bla.log which gave me a tiny bla.log.gz When I extract it using gunzip bla.log.gz I get back ...
1
vote
2answers
641 views

Excluding Path While Compressing with TAR/GZ

I am compressing list of files like this: tar cvzf mycompress.tar.gz /dir1/dir2/file1.txt /dir1/dir2/file2.txt However when I uncompressed them the directory /dir1/dir2/ is still preserved. How to ...
2
votes
1answer
84 views

Which is better: using flags, or pipes?

As with many things in the *nix world, there is more than one way to generate .tar.gz files. Typically, I use the following: tar zcf /path/to/dir.tar.gz /path/to/dir However, I have seen the ...
19
votes
4answers
47k views

How to gzip multiple files into one gz file?

I have 100 files: cvd1.txt cvd2.txt ... cvd100.txt How to gzip 100 files into one .gz file so that after I gunzip it, I should have cvd1.txt, cvd2.txt ... cvd100.txt separately? Thanks for your ...
0
votes
1answer
636 views

With which command should I open .raw.gz files?

I have a bunch of .raw.gz files which are data files streamed from twitter with JSON interface. I am wondering which command should I use on my Mac OSX to open (unzip) these files? I have tried tar, ...
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 ...
2
votes
2answers
1k views

How do I tar/gzip and then delete directories somewhat safely?

How should I tar/gzip and delete files somewhat safely? Background: We're running a little low on disk space on a Ubuntu computer (Hardy Heron), and I want to tar/gzip, verify that it worked, and ...
2
votes
2answers
2k views

gzip compressed file ownership and permissions

I'm trying to find out how gzipping a file changes its permissions. The gzip manual (man gzip) says: Whenever possible, each file is replaced by one with the extension .gz, while keeping the ...