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 152 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