≡ Menu

How to Compress/Archive a Folder in Linux

To Compress a Folder in Linux you can running this command:

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:

tar -zcvf [archive-file-name]
e.g: tar -zxvf file.tar.gz

note:
-x: Extract files

{ 0 comments… add one }

Leave a Comment

*