navi: Update compression sheet
This commit is contained in:
parent
0bc5d22ca6
commit
6e61e5d96d
@ -1,20 +1,24 @@
|
||||
% compression
|
||||
|
||||
# Create a tar containing files
|
||||
# Create a tar archive
|
||||
tar cf <name>.tar <files>
|
||||
|
||||
# Extract the files from a tar
|
||||
# Extract a tar archive
|
||||
tar xf <tar_file>
|
||||
|
||||
# Create a tar with Gzip compression
|
||||
# Create a tar archive with gz compression
|
||||
tar czf <name>.tar.gz <files>
|
||||
|
||||
# Compress file and appends .gz to its name
|
||||
gzip <path>
|
||||
# Extract a tar using gz compression
|
||||
tar xzf <targz_file>
|
||||
|
||||
# Decompress compressed file
|
||||
# Create a gz archive
|
||||
gzip -9 -c <files> > <name>.gz
|
||||
|
||||
# Extract a gz archive
|
||||
gzip -d <gz_file>
|
||||
|
||||
$ 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}'
|
||||
|
Loading…
x
Reference in New Issue
Block a user