Friday, October 23, 2015

tar command

I have large files.

First, I compress the files to make a tar file:

tar -c -f tarfile.tar file1 file2

Second, I make compressed files using gzip:

gzip -c tarfile.tar | split -b 8MiB - tarfile_split.gz_

This is useful because of the unstable speed of the Internet. I can download 8MiB files one by one first.

Getting back all the "gzip" files, I convert them into the tar file.

cat tarfile_split.gz_* | gunzip -c > tarfile_recover.tar


Converting files, I get the original file1 file2 by:

tar -xvf tarfile_recover.tar

No comments:

RSS