navi: Improve compression commands

This commit is contained in:
2026-09-11 10:16:06 +02:00
parent 5411dcfa35
commit 981113b24c
+25 -6
View File
@@ -1,16 +1,34 @@
% compression
# Create a tar archive
tar cf <name>.tar <files>
tar -cvf <name>.tar <files>
# Create a tar archive (gz compression)
tar -cvzf <name>.tar.gz <files>
# Create a tar archive (pigz compression)
tar -I pigz -cvf <name>.tar.gz <files>
# Create a tar archive (bzip2 compression)
tar -cvjf <name>.tar.bz2 <files>
# Create a tar archive (pbzip2 compression)
tar -I pbzip2 -cvf <name>.tar.bz2 <files>
# Extract a tar archive
tar xf <tar_file>
tar -xf <tar_file>
# Create a tar archive with gz compression
tar czf <name>.tar.gz <files>
# Extract a tar (gz compression)
tar -xzf <targz_file>
# Extract a tar using gz compression
tar xzf <targz_file>
# Extract a tar (pigz compression)
tar -I pigz -xf <targz_file>
# Extract a tar (bzip2 compression)
tar -xjf <tarbz2_file>
# Extract a tar (pbzip2 compression)
tar -I pbzip2 -xf <tarbz2_file>
# Create a gz archive
gzip -9 -c <files> > <name>.gz
@@ -21,4 +39,5 @@ gzip -d <gz_file>
$ 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}'