Create and extract a tar.gz file

Just a quick reminder for myself.

Create a tar.gz from a folder, while preserving the permissions:

tar -pcvzf tar-archive-name.tar.gz source-folder-name

Extract the tar.gz while preserving the permissions:

tar -pxvzf tar-archive-name.tar.gz