Skip to content

How to create tar.gz file


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


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


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