Tech C**P
15 subscribers
161 photos
9 videos
59 files
304 links
مدرس و برنامه نویس پایتون و لینوکس @alirezastack
Download Telegram
Create a tar.gz file using tar command:

tar -zcvf tar-archive-name.tar.gz source-folder-name

-z: The z option is very important and tells the tar command to uncompress the file (gzip).

-c: I don't know! If you know what it does please tell me. Thank you.

-v: The “v” stands for “verbose.” This option will list all of the files one by one in the archive.

-f: This options tells tar that you are going to give it a file name to work with.


This will compress the contents of source-folder-name to a tar.gz archive named tar-archive-name.tar.gz


To extract a tar.gz compressed archive you can use the following command:

tar -zxvf tar-archive-name.tar.gz

-x: This option tells tar to extract the files.


This will extract the archive to the folder tar-archive-name.

#linux #tar #targz #zip #compress