Question: how do i gzip a directory?
Answer: In order to compress a folder, tar + gzip (which is basically tar -z ) is used​. Let's have a look at how to use tar -z to compress an entire directory in Linux. The parameters after the -zcvf flag are the compressed file name and the original folder to compress, respectively.