I have some 10 to 20 .ZIP files in a given UNIX Directory and how to extract all the files into a one output file and preferably a .GZ file.
Pls suggest.
I have some 10 to 20 .ZIP files in a given UNIX Directory and how to extract all the files into a one output file and preferably a .GZ file.
Pls suggest.
.gz files can only contain one file, so we use something like tar to create an archive and then gzip to compress it:
mkdir tmp
cd tmp
for files in ../*.zip
do
unzip $files
done
tar -cf - . | gzip -c > ../all.tgz
I hope this helps
in unix we use gzcat *.gz | grep or awk like that.
In a similar way how to work on the .zip files without completely extracting them