Unix/Linux Commands: gzip, tar
Purpose file archiving -compressing multiple files into one smaller file -extracting/decompressing files from an archive -makes sharing files easier tar deals with its own format (.tar)
Usage: gzip gzip [options] [path ... ] examples: gzip fileToCompress gzip -d fileToDecompress gzip -r directoryToRecursivelyCompress gzip -c fileToCopyCompress > newArchiveName
Options: gzip -c, --stdout writes output to stdout (files unchanged) -d, --decompress extract files from archive -r, --recursive recursively act on all in the directory
Options: gzip (cont.) -S .suf, --suffix .suf end compressed file with .suf rather than .gz -1-9, --fast, --best set compression speed/quality from faster, less compression to better, slower compression
Usage: tar tar [functions] [options] [path … ] examples: tar -c -f newArchiveName fileOrDirToCompress tar -cf newArchiveName fileOrDirToCompress tar cf newArchiveName fileOrDirToCompress tar tf archiveToListFilesOf tar xf archiveToDecompress
Functions: tar -c, --create create new archive -t, --list list files in archive -x, --extract, --get extract files from archive
Options: tar -f, --file=archiveName specify name of archive to compress to --overwrite overwrite files when extracting
Demonstration
Recommend
More recommend