How to compress a folder

Using tar and gzip, you can compress a whole folder by using the following command:

$tar -zcvf <file name>.tar.gz <folder name>