Gzip Tar untar and multispan archives


Tar and GunZip allows you to package up and compress folders and files in Linux based systems.

The common commands you will need are below.

Create a tar.gz

tar -czvf archive.tar.gz /path/to/directoryorfile

Extract a tar.gz to current directory

tar -xzvf archive.tar.gz

Extract a tar.gz to a specific directory

tar -xzvf archive.tar.gz -C /tmp

Split Tar file

tar -cz directoryorfile

split -b 1M splitarchive.tar.gz "parts-prefix" -b 1000M

Rejoin Tar.gz file

cat splitarchive.tgz.* | tar -xz

Photo by Leroy Evans on Unsplash


Popular posts from this blog

Rant: Don't name your mobile app with a pronoun prefix

Web 3.0: Component driven responsive design

Why you should use rem instead of px in webdesign