navi: Update compression sheet
This commit is contained in:
parent
e24ddc4cf8
commit
d56540efb8
@ -1,20 +1,20 @@
|
|||||||
% compression
|
% compression
|
||||||
|
|
||||||
# Create a tar containing files
|
# Create a tar archive containing files
|
||||||
tar cf <name>.tar <files>
|
tar cf <name>.tar <files>
|
||||||
|
|
||||||
# Extract the files from a tar
|
# Create a tar archive with gz compression
|
||||||
tar xf <tar_file>
|
|
||||||
|
|
||||||
# Create a tar with Gzip compression
|
|
||||||
tar czf <name>.tar.gz <files>
|
tar czf <name>.tar.gz <files>
|
||||||
|
|
||||||
# Compress file and appends .gz to its name
|
# Extract a tar archive
|
||||||
gzip <path>
|
tar xf <tar_file>
|
||||||
|
|
||||||
# Decompress compressed file
|
# Create a gz archive containing files
|
||||||
|
gzip -9 -c <files> > <name>.gz
|
||||||
|
|
||||||
|
# Extract a gz archive
|
||||||
gzip -d <gz_file>
|
gzip -d <gz_file>
|
||||||
|
|
||||||
$ path: ls
|
$ files: ls | awk -F: '{ print $1}'
|
||||||
$ tar_file: ls *.{tar,tar.*} 2>/dev/null
|
$ tar_file: ls *.{tar,tar.*} | awk -F: '{ print $1}'
|
||||||
$ gz_file: ls *.gz
|
$ gz_file: ls *.gz | awk -F: '{ print $1}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user