Is it possible to programmatically pull a single file from a decently sized .tar.gz without extracting the entire tarball to disk? Essentially I need to get inside large tar.gz files over the network and extract 1 small text file. It seems somewhat over-the-top to pull and extract the tarball to disk, then pull the file out, then delete everything else. Also I’m going to be doing this recursively (e.g. package dependencies, each text file points to more tar.gz’s), so the less network traffic and cpu cycles I can get away with, the better.
Is it possible to programmatically pull a single file from a decently sized .tar.gz
Share
From the man page, to extract blah.txt from foo.tar.gz:
(And this goes on superuser, of course, but hey, prompt answers are nice too.)