add the old snippet md files

This commit is contained in:
Travis Shears 2025-06-05 16:20:57 +02:00
parent fc0dd204c7
commit bcf8313a4b
110 changed files with 3048 additions and 0 deletions

View file

@ -0,0 +1,41 @@
---
title: "gzipping an existing tar"
date: 2020-10-14T09:12:54+02:00
draft: false
snippet_types:
- tar
- gzip
---
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](https://apps.apple.com/us/app/freeze-for-amazon-glacier/id1046095491?mt=12). Like to start with
creating a regular tar file in /tmp.
```shell
$ tar cvf /tmp/pic_dump_14_10_20.tar ~/Desktop/**/*.png
```
Then append few more images. `r` in this case sanding for append..
```shell
$ 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.
```shell
$ 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.
```shell
$ gzip /tmp/pic_dump_14_10_20.tar
```
source: https://alvinalexander.com/blog/post/linux-unix/how-work-files-tar-gzip-tgz/ (4)