Gzip Tar untar and multispan archives

TAR AND GZip

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


Comments

Popular posts from this blog

Git initialise new repository with existing source

Why you should use rem instead of px in webdesign

Web 3.0: Component driven responsive design