How to gzip multiple image files into one .gz?

Matt Graham danceswithcrows at usa.net
Mon May 14 11:54:21 MST 2012


> On Mon, May 14, 2012 at 11:32 AM, <joe at actionline.com> wrote:
>> Is there a way to gzip multiple image files into a single .gz file?
From: James Finstrom <jfinstrom at rhinoequipment.com>
> tar -czvf images.tar.gz image1 image2 image3

gzip , like bzip2 , works on *one file*.  If you want to put multiple files
together and compress them, you can't do it with gzip alone.  One way to do
that is to use tar in conjunction with gzip (or bzip2) as James showed above.

You don't have to use tar; you can also use another archiver like cpio.  Or
you can use zip, as in "zip -r mydirectory.zip mydirectory/" , which will
create a pretty ordinary zip file that may be easier for a less-literate
person to open on Windows/OS X.  There are many ways to archive and compress
files, since people have needed to do that for almost 40 years now....

-- 
Matt G / Dances With Crows
The Crow202 Blog:  http://crow202.org/wordpress/
There is no Darkness in Eternity/But only Light too dim for us to see



More information about the PLUG-discuss mailing list