Gzip multiple


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Gzip multiple
# 8  
Old 05-22-2019
and how would it be used?
# 9  
Old 05-22-2019
Quote:
Originally Posted by tricampeon81
and how would it be used?
to start with...
tar cvf bulkArchive.tar expla*.gz
This User Gave Thanks to vgersh99 For This Post:
# 10  
Old 05-27-2019
I can not find a solution to this problem
# 11  
Old 05-27-2019
Quote:
Originally Posted by tricampeon81
I can not find a solution to this problem
Why is the suggestion posted by vgersh99 in post #9 in this thread not a solution to this problem?
This User Gave Thanks to Don Cragun For This Post:
# 12  
Old 05-27-2019
Quote:
Originally Posted by tricampeon81
I can not find a solution to this problem
There isn't one because gzip does not work that way.

We are not being obtuse or blocking you -- gzip doesn't work that way. gzip holds one and only one filename.

This may be counterintuitive but is completely normal for UNIX, where archiver and compressor are different programs. The usual way to pack multiple files into a gzip is to create a tar file, then gzip the tar file. This is the normal UNIX way to create an archive. tar is a standard UNIX command and file format which you now have instructions for using.

Why are you so deadset on using gzip by itself? What are your requirements?

Last edited by Corona688; 05-27-2019 at 11:50 AM..
This User Gave Thanks to Corona688 For This Post:
# 13  
Old 05-27-2019
I am not convinced, I am ignorant in this problem so I ask for your help, as requested I am asked to use the gzip, I thought it could.
# 14  
Old 05-27-2019
Quote:
Originally Posted by tricampeon81
I am not convinced, I am ignorant in this problem so I ask for your help, as requested I am asked to use the gzip, I thought it could.
I am sorry that you don't believe us.

Have you looked at the man page for gzip? Does the man page for the version of gzip you are using say anything about it being able to zip multiple files into a single archive (other than by zipping an archive containing multiple files?

You are, of course, free to build your own utility similar to gzip that might be able to do what you want, but the resulting archive would not be able to be unzipped by any existing gunzip utilities to restore your original files in one step.

The file format used by gzip when creating a file with the .gz suffix contains information describing the data needed to decompress the data in that file. It does not contain a table of contents needed to enable it to contain multiple compressed files.

Creating additional threads is not going to solve your problem!
This User Gave Thanks to Don Cragun For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Compress multiple gzip files

Good afternoon friends. I wanted to make a query, how to compress several files and leave them all in 1, for example flat text files: filename_1.csv filename_2.csv filename_3.csv expected result filename_end.gzip = (filename_1.csv filename_2.csv filename_3.csv) please (2 Replies)
Discussion started by: tricampeon81
2 Replies

2. Shell Programming and Scripting

Is better way copy list of multiple files, rename and gzip

Is better way to write the script loop through one by one "Old_File_1: & New_File_1:" to copy 100 files to /staging/test folder then re-name & gzip all those files? I wrote this code below and don't like that much. Thanks I have a control_file under /tmp/test folder like below 100 files and... (10 Replies)
Discussion started by: dotran
10 Replies

3. Shell Programming and Scripting

Gzip

if ;then echo "mrnet greater 5000" gzip /var/log/mrnet.log /var/log/mrnet.log.1.gz fi i'm looking if mrnet.log is bigger then 5000 then compress mrnet.log to mrnet.log.1.gz but it won't compress. (3 Replies)
Discussion started by: Froob
3 Replies

4. UNIX for Advanced & Expert Users

gzip vs pipe gzip: produce different file size

Hi All, I have a random test file: test.txt, size: 146 $ ll test.txt $ 146 test.txt Take 1: $ cat test.txt | gzip > test.txt.gz $ ll test.txt.gz $ 124 test.txt.gz Take 2: $ gzip test.txt $ ll test.txt.gz $ 133 test.txt.gz As you can see, gzipping a file and piping into gzip... (1 Reply)
Discussion started by: hanfresco
1 Replies

5. Shell Programming and Scripting

gzip

Hi, I want to gzip files in loop. for i in `ls *.xml`; do gzip $i; done But i am gettin error like "/usr/bin/ls: Arg list too long" Also please tell me how to do it with while loop and also using find and then exec. (7 Replies)
Discussion started by: tushar_tus
7 Replies

6. Shell Programming and Scripting

Gzip help

Hi Experts!! I was creating a zip file in a server which had zip installed in it. I have another server in which zip is not there and i am instructed to make use of gzip to compress files. I would need your help to know the way to create a gzip file. 1) I do the following to create the zip... (5 Replies)
Discussion started by: ganga.dharan
5 Replies

7. SCO

gzip

ciao a tutti, premesso che sono un principiante di unix, avrei bisogno di gzip/gunzip e SOPRATTUTTO delle istruzioni (ahimè dettagliatissime, come per un bimbo!) per installarlo... grazie mille, ciao (1 Reply)
Discussion started by: mfran2002
1 Replies

8. UNIX for Dummies Questions & Answers

GZIP help, please!

Gurus, My own stupidity (or ignorance...or both) put me in the situation I am in and I need help please: 1-My shell account (OS: HP UX v11) contains several work directories (/docs, /scripts...) 2-Our sysadmin has implemented aggressive disk quotas so I have to compress the files I put here... (2 Replies)
Discussion started by: alan
2 Replies

9. UNIX for Advanced & Expert Users

using gzip

Hi, I am trying to unzip a file that I unmounted onto a unix machine from a cd I had burned in a Windows machine. The file I am trying to unzip is a .tar file... it was originally a .tar.gz file because it was zipped using gzip. I have tried: % gzip -d hpux.tar (where hpux.tar is the file... (2 Replies)
Discussion started by: nattie_h
2 Replies

10. UNIX for Dummies Questions & Answers

gzip, multiple files

Hello Everyone, Here is what I am trying to do. I have four text files, I want to gzip them under unix and mail the zipped file via outlook. I am able to do this easily enough, but using winzip or pkunzip to unzip the file, there is only one file. (In essence, all four files were... (2 Replies)
Discussion started by: smbodnar
2 Replies
Login or Register to Ask a Question