navi/cheats/compression.cheat

25 lines
424 B
Text
Raw Normal View History

% compression
2019-09-20 13:38:58 +00:00
# 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
2019-10-14 16:54:09 +00:00
$ gz_file: ls *.gz