diff --git a/navi/compression.cheat b/navi/compression.cheat index ad699a6..d4a1d6d 100644 --- a/navi/compression.cheat +++ b/navi/compression.cheat @@ -1,20 +1,20 @@ % compression -# Create a tar containing files +# Create a tar archive containing files tar cf .tar -# Extract the files from a tar -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 archive +tar xf -# Decompress compressed file +# Create a gz archive containing files +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,tar.*} | awk -F: '{ print $1}' +$ gz_file: ls *.gz | awk -F: '{ print $1}'