How to uncompress tar.gz?

Dopani

Well-known member
Registered
Joined
Mar 11, 2014
Messages
233
Points
18
I got a file called file.tar.gz from my hosting. How can I uncompress this file on a Centos server from command line? I want all the files extracted the the current directory that I am in. I imagine this would work for Windows?
 

Kamley

New member
Registered
Joined
Oct 23, 2017
Messages
6
Points
0
I think you can try typing this command:
$ tar xvzf file.tar.gz -C /path/to/somedirectory
It should extract to your current directory.
 

8COREHOST

Member
Registered
Joined
Jul 3, 2017
Messages
24
Points
1
you can unzip using this commend tar -xzvf yourfilename.tar.gz
 

Maxoq

Well-known member
Registered
Joined
Feb 25, 2015
Messages
520
Points
28
I got a file called file.tar.gz from my hosting. How can I uncompress this file on a Centos server from command line? I want all the files extracted the the current directory that I am in. I imagine this would work for Windows?
Make sure that your file.tar.gz is in your current folder, you can use this command ll to check files in a folder


After that type:
gzip -d file.gz
For other file formats, you can use these commands

zip file
Code:
unzip file.zip
tar file
Code:
tar -xvf file.tar
gz or tar file

Code:
gzip -d file.tar.gz
and then

Code:
tar -xvf file.tar
tgz file
Code:
tar -xvzf file.tgz
Hope that helped.
 
Newer Threads
Replies
2
Views
2,041
Replies
1
Views
1,360
Replies
2
Views
3,341
Replies
30
Views
6,274
Recommended Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top