Re: Extract file from tar home/

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

 



On Tuesday 08 June 2010 04:26 PM, Patrick O'Callaghan wrote:
> On Tue, 2010-06-08 at 18:15 -0400, Bob Goodwin wrote:
>> Yes, and this is essentially what I did except I tar'd the entire
>>      /home/bobg/ directory into one big lump. My question was could I
>> go in and unzip individual files. It seems that can't be done easily.
>
> You don't seem to have grokked the previous answers (mine and others)
> including the one you're replying to. What you want to do is easy and
> completely standard. The quoted answer tells you exactly how to do it.
> Once more with feeling:
>
> To extract the whole thing:
> $ tar xf bobg.tar.gz
> (or tar xvf to if you want to watch it working)
>
> To extract only a specific file:
> $ tar xf bobg.tar.gz the/file/you/want
>

I think the OP's worry is not whether it can be done, but he wants to 
avoid the time and CPU cycles involved in the gunzip step. Since he has 
his entire home directory in the tarball, even extracting a single file 
requires tar to decompress the entire tarball before it can extract that 
one file.

I think the only solution in this case is to do

$ gunzip bobg.tar.gz

and keep the resulting bobg.tar file in some easy to access area. A 
subsequent

$ tar xf bobg.tar /path/to/my/file

should be fast and easy to do.

> poc
>

Apologies if my understanding of the OP's problem is incorrect.
-- 
Suvayu

Open source is the future. It sets us free.
-- 
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