To Compress a Folder in Linux you can running this command:
1 2 |
tar -zcvf [archive-file-name] [path-to-folder] e.g: tar -zcvf file.tar.gz /home/file |
note:
-z: Compress archive using gzip program
-c: Create archive
-v: Verbose i.e display progress while creating archive
-f: Archive File name
To Exract an Arhive:
1 2 |
tar -zcvf [archive-file-name] e.g: tar -zxvf file.tar.gz |
note:
-x: Extract files