Dilip Chhetri <[email protected]> ha escrit:

> I have lots of large .tar.gz files and I need to extract just a single
> (small) file from it. I purposely put it at the front of .tar file so that
> extraction is fast, but if that file is gzipped, then 'tar' wants to read
> the whole .tgz file before exiting.

Not quite so.  Tar needs to read entire file because by default it
attemts to extract all matching members from the archive, and that
behavior does not depend on whether the file is compressed or not.

If you need to extract just the first occurrence of the file, use the
--occurrence option, like that:

  tar jxf linux-3.4.2.tar.bz2 --occurrence=1 
linux-3.4.2/Documentation/ABI/README

Regards,
Sergey

Reply via email to