How to Use: gzip

Install

sudo pacman -S gzip

Prerequisites

  1. Create a playground:
mkdir archive-test
cd archive-test
  1. Create some content:
mkdir content
echo content1 >> content/file1
echo content2 >> content/file2
echo content3 >> content/file3
  1. Back up your content:
tar -cf archive-1.tar content

Compress

gzip -9 -f -k archive-1.tar

Extract

gunzip -f -k archive-1.tar.gz

Or:

gzip -d -f -k archive-1.tar.gz

Cleanup

Don’t forget to remove your test files after playing with this:

cd ..
rm -rf archive-test