navi/cheats/compression.cheat
Denis Isidoro 132aee10ce 0.3.0
2019-09-20 14:01:12 -03:00

24 lines
No EOL
439 B
Text

% tar, zip, gzip, 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>
# Extract a tar using Gzip
tar xzf <targz_file>
# Compress file and appends .gz to its name
gzip <path>
# Decompress compressed file
gzip -d <gz_file>
$ path: ls
$ tar_file: ls *.tar
$ targz_file: ls *.tar.gz
$ gz_file: ls *.gz