# Single file extract from a tar



## jaymax (Aug 5, 2009)

How can I do a single file extract from a tar file

tar xvf example.tar => extracts the whole tar file, which may be very large.

Might be missing it in the man pages


----------



## DutchDaemon (Aug 5, 2009)

The HowTo & FAQ forum is not for _asking_ 'how to' ..


----------



## DutchDaemon (Aug 5, 2009)

[cmd=]tar zxvf bla.tar.gz --include="file.to.extract"[/cmd]

or

[cmd=]tar zxvf bla.tar.gz --include="*pattern*"[/cmd]


----------



## jaymax (Aug 5, 2009)

Answering myself
tar xvf tarfile.tar --include='desiredfile'
did it!


----------



## DutchDaemon (Aug 5, 2009)

Just pretend I'm not here


----------



## mk (Aug 5, 2009)

DutchDaemon said:
			
		

> Just pretend I'm not here


rofl


----------



## jaymax (Aug 5, 2009)

DutchDaemon said:
			
		

> Just pretend I'm not here



Ooops! I did not refresh my page before posting, just wanted to post a solution before wasting anyone else's effort.

Yes you were there and please forgive the omission


----------

