How to create and extract .tar.gz file


Hi Friends,

Here we will discuss how to create and compress the folder into the .tar.gz file

Compress the file or folder:

I had used the sudo before tar command because it will not have any permission issue.

Here are the switches actually mean:

-c: Create an archive

-v: It is used for display the progress on the screen.It is optional so you can skip it

-z: Compress the archive

-f: Allow to specify the filename

Extract the file:

Here are the switch mean:

-x: Extract file

After executing the above command I will get example folder in /var/www/html directory.


Leave a Comment

Your email address will not be published. Required fields are marked *

Optimization WordPress Plugins & Solutions by W3 EDGE