diff --git a/navi/compression.cheat b/navi/compression.cheat index 8ecc8e0..d3abcb2 100644 --- a/navi/compression.cheat +++ b/navi/compression.cheat @@ -1,16 +1,34 @@ % compression # Create a tar archive -tar cf .tar +tar -cvf .tar + +# Create a tar archive (gz compression) +tar -cvzf .tar.gz + +# Create a tar archive (pigz compression) +tar -I pigz -cvf .tar.gz + +# Create a tar archive (bzip2 compression) +tar -cvjf .tar.bz2 + +# Create a tar archive (pbzip2 compression) +tar -I pbzip2 -cvf .tar.bz2 # Extract a tar archive -tar xf +tar -xf -# Create a tar archive with gz compression -tar czf .tar.gz +# Extract a tar (gz compression) +tar -xzf -# Extract a tar using gz compression -tar xzf +# Extract a tar (pigz compression) +tar -I pigz -xf + +# Extract a tar (bzip2 compression) +tar -xjf + +# Extract a tar (pbzip2 compression) +tar -I pbzip2 -xf # Create a gz archive gzip -9 -c > .gz @@ -21,4 +39,5 @@ gzip -d $ files: ls | awk -F: '{ print $1}' $ tar_file: ls *.tar | awk -F: '{ print $1}' $ targz_file: ls *.tar.gz | awk -F: '{ print $1}' +$ tarbz2_file: ls *.tar.bz2 | awk -F: '{ print $1}' $ gz_file: ls *.gz | awk -F: '{ print $1}'