I apologize as this probably isn't the correct forum to ask this, but I couldn't find one that was more appropriate, and I'm hoping that those who frequent this forum know the answer to this question.
I am wondering what the UNIX WinZip equivilant is. Iím trying to make a list to make it as easy as possible to move a site, and one of the steps would be to zip the files on the old server to ensure a faster download of the files. Iím also thinking that it would be a good idea to tar the files together first. So what Iím really asking is this:
How does one tar together a group of files and then compress that tared file? And how can the process be reversed.
A quick example would be very much appreciated !
Thanks in advance !
Can gzip compress several files into a single archive?
Not directly. You can first create a tar file then compress it:
for GNU tar: gtar cvzf file.tar.gz filenames
for any tar: tar cvf - filenames | gzip > file.tar.gz
How can I extract a tar.gz or .tgz file?
Files with extension tar.gz or .tgz are tar files compressed with gzip. On Unix extract them with:
gunzip < file.tar.gz | tar xvf -
gunzip < file.tgz | tar xvf -
If you have GNU tar you can use the z option directly:
gtar xvzf file.tar.gz
gtar xvzf file.tgz