gzipping an existing tar - 10-14-20

Part of my work process is taking lots of screenshot, ~5 per day. Then I back them up in AWS S3 Glacier once a month, using freeze app. Like to start with creating a regular tar file in /tmp.

$ tar cvf /tmp/pic_dump_14_10_20.tar ~/Desktop/**/*.png

Then append few more images. r in this case sanding for append..

$ tar rfv /tmp/pic_dump_14_10_20.tar ~/Pictures/resized/*

Now that the tar is complete I double check it by listing the files.

$ tar tf /tmp/pic_dump_14_10_20.tar

Lastly I need to compress the tar and I was confused if I could use tar command itself to compress a tar into a tar.gz but turns you use gunzip.

$ gzip /tmp/pic_dump_14_10_20.tar

source: https://alvinalexander.com/blog/post/linux-unix/how-work-files-tar-gzip-tgz/ (4)

\- [ tar, gzip ]