21 lines
368 B
Plaintext
21 lines
368 B
Plaintext
|
% compression
|
||
|
|
||
|
# Create a tar containing files
|
||
|
tar cf <name>.tar <files>
|
||
|
|
||
|
# Extract the files from a tar
|
||
|
tar xf <tar_file>
|
||
|
|
||
|
# Create a tar with Gzip compression
|
||
|
tar czf <name>.tar.gz <files>
|
||
|
|
||
|
# Compress file and appends .gz to its name
|
||
|
gzip <path>
|
||
|
|
||
|
# Decompress compressed file
|
||
|
gzip -d <gz_file>
|
||
|
|
||
|
$ path: ls
|
||
|
$ tar_file: ls *.{tar,tar.*} 2>/dev/null
|
||
|
$ gz_file: ls *.gz
|