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
Comments
Post a Comment