Compress Commands
- zip
- gzip
- tar
ZIP Command: (files & dir – 65% compress)
zip file_name.zip file_name //zip the filezip -r dir.zip dir_name //zip the directoryzip -e dir.zip dir_name // Password Protected ZIP filezip -s 1g -r archivename.zip directory_name //splite file 1gb
unzip file_name.zip //extract the zip fileunzip dir.zip
GZIP Command: (only file to move //65% compress)
gzip file_name //gzip the file
gunzip file_name.gz //extract the gzip file
TAR Command: (file or folders to file – no compress)
tar -cvf file_name.tar file_name //make tar filetar -cvf dir_name.tar dir_nametar -xvf file_name.tar //untar the tar file
tar -cvzf file_name.tar.gz file_name //make tar file with compresstar -cvzf dir_name.tar.gz dir_nametar -xvzf file_name.tar.gz //untar the tar file