Re: Extract file from tar home/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2010-06-07 at 15:08 -0700, jack craig wrote:
> it only makes sense, zip deflated the individual files and tar is 
> ignorance of that requirement.
> hence the untar, then unzip.

[Please don't top-post on this list. See the Guidelines.]

There is nothing in the OP's message to indicate how the tar file was
created. The usual way is similar to:

tar cf - dir | gzip > dir.tar.gz (or dir.tgz, it's irrelevant).

(Note gzip, not zip). The advantage of doing it this way is that it will
almost always give a smaller final file, as the compression phase can
utilize redundancy over the whole tar file and not one component at a
time.

If this is in fact what the OP did, then the current version of tar can
read it directly without an intermediate gunzip stage. In fact it can
detect the compression automatically without the need for a specific
command option. Thus:

tar tvf bobg.tar.gz
        will list all the files, and
tar xvf bobg.tar.gz foo
        will extract file "foo"

poc

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux