How to tar.gz a directory 📁

Date: 13-04-2025


What you will need 📋


Why?

Main reason why you want to tar.gz a directory is because it compresses a directory and all of the data inside of it. It is also good for backing things up too.


The command

$ tar -czvf file.tar.gz /Location/Of/Directory


All done ✅

Really easily done, only one command and done!


  Back 🚪