How to uncompress tar.gz?

Dopani

Well-known member
Registered
Joined
Mar 11, 2014
Messages
239
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,230
Replies
1
Views
1,571
Replies
2
Views
3,571
Replies
30
Views
6,873
Latest Threads
Replies
0
Views
20
Replies
0
Views
41
Replies
1
Views
42
Replies
0
Views
237

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