tar vs gzip command

Tar is a program that help us to package files and directories. on the other hand there is gzip that is used to compress them. For this basic tutorial I suppose that we want to package and compress the /home/user/Pictures directory.

Packaging to .tar

$ tar cvf pictures.tar /home/user/Pictures

Compressing from .tar to .tar.gz

$ gzip -9r pictures.tar

Unpacking .tar files

$ tar xvf pictures.tar

Decompress and Unpacking .tar.gz files

$ tar xvfz pictures.tar.gz
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.