dmitry-pro
10/12/2017 - 10:57 AM

zip tar cheatsheet

zip tar cheatsheet

# Compress file
zip compressed.zip file_name.txt

# Compress Folder
zip -r compressed.zip folder_name/

# Uncompress zipped file to current directory
unzip compressed.zip

# Uncompress zipped to current directory to specific location
unzip compressed.zip -d ~/Documents

# Compress a file / folder
tar zcvf compressed.tar.gz folder_name

# Uncompress a tar file
tar zxvf compressed.tar.gz