Erik Fredericks, frederer@gvsu.edu Fall 2025
Based on material provided by Erin Carrier, Austin Ferguson, and Katherine Bowers
Windows compatible (by default) ... usually
zip file.zip files_to_compress
unzip file.zip
zip
unzip
gzip - fastest
gzip
gzip file
gunzip file.gz
bz2 - old standard, better compression
bz2
bzip2 file
bunzip2 file.bz2
xz - new standard, may not be installed
xz
xz file
unxz file.xz
Zip can handle by default
So, let's tar it
tar
tar -cvf name.tar file1 file2
Can extract:
tar -xvf name.tar
Or view its table of contents:
tar -tvf name.tar
Let's automatically compress/decompress!
-z
-j
-J
Ex (compress): tar -zcvf name.tar.gz dir1 dir2 file1
tar -zcvf name.tar.gz dir1 dir2 file1
Ex (decompress): tar -zxvf name.tar.gz
tar -zxvf name.tar.gz
mkdir newdir && tar -zxvf file.tar.gz -C newdir