6/30/2011 ~ 1 min read

Tar Commands For Backup


TAR.GZ This format is my weapon of choice for most compression. It gives very good compression while not utilizing too much of the CPU while it is compressing the data. To compress a directory use the following syntax: # tar -zcvf archive_name.tar.gz directory_to_compress To decompress an archive use the following syntax: # tar -zxvf archive_name.tar.gz This will extract the files in the archive_name.tar.gz archive in the current directory. Like with the tar format you can optionally extract the files to a different directory: # tar -zxvf archive_name.tar.gz -C /tmp/extract_here/


Headshot of Matthew Hippely

Hi, I’m Matthew. I live in Ventura County, and spend my time thinking about systems, software, and how things evolve over time.

You can find me on GitHub, LinkedIn, or read more about me here.