From 9af06e13466cd2710cd50720f30e1c5a68b66219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin-Charles=20Guih=C3=A9neuf?= Date: Tue, 8 Mar 2022 09:03:55 +0100 Subject: [PATCH] navi: Update compression sheet --- navi/compression.cheat | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/navi/compression.cheat b/navi/compression.cheat index ad699a6..8ecc8e0 100644 --- a/navi/compression.cheat +++ b/navi/compression.cheat @@ -1,20 +1,24 @@ % compression -# Create a tar containing files +# Create a tar archive tar cf .tar -# Extract the files from a tar +# Extract a tar archive tar xf -# Create a tar with Gzip compression +# Create a tar archive with gz compression tar czf .tar.gz -# Compress file and appends .gz to its name -gzip +# Extract a tar using gz compression +tar xzf -# Decompress compressed file +# Create a gz archive +gzip -9 -c > .gz + +# Extract a gz archive gzip -d -$ path: ls -$ tar_file: ls *.{tar,tar.*} 2>/dev/null -$ gz_file: ls *.gz +$ files: ls | awk -F: '{ print $1}' +$ tar_file: ls *.tar | awk -F: '{ print $1}' +$ targz_file: ls *.tar.gz | awk -F: '{ print $1}' +$ gz_file: ls *.gz | awk -F: '{ print $1}'