How to extract particular file / folder from tar archive

0
Matt 12 Rep.

Hi,

I have large tar archive file (.tar.gz) on the server and I would like to extract particular files and folders from it because I don’t have much space on the server to extract entire tar archive. Can someone help me to extract particular files/folders?

Thanks,
Matt

Kailash selected answer

Best answer

0
Kailash 188 Rep.

You can extract particular file/folder from your .tar.gz file as follow:

tar -zxvf your-file.tar.gz filename

tar -zxvf your-file.tar.gz directory-name

Please note that you have to specify exact path to extract file/directory.

Matt commented on answer
×

Login

Login to see your profile links
Bloom Email Optin Plugin

Users

Kailash
188 Rep. 21 Best 33 Answers 1 Questions
User1984
User1984
59 Rep. 0 Best 0 Answers 24 Questions
Scott
Scott
43 Rep. 6 Best 7 Answers 1 Questions