Skip to content

How to create tar.gz file

Why

Sometimes we want to create a tarball of a directory to store and save space

How

Assuming we want to tarball the /var/www directory we would do the below

Move to the directory

cd /var

Start the Tarball

tar -czvf <name>.tar.gz www

Additional Reading

Cyberciti


Want to make this site better? Open a PR or help fund hosting costs