How to Use: gzip

Install Link to heading

sudo pacman -S gzip

Prerequisites Link to heading

  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 Link to heading

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

Extract Link to heading

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

Or:

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

Cleanup Link to heading

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

cd ..
rm -rf archive-test