How do I extract a directory from a tar file
I backed up my /home directory to backup.zip. Rather than pull everything out, right now I only want to pull out my /images folder. It's under /home/tom/images. How, if I can, do this? Thanks, Tom
-----Original Message----- From: Tom Nielsen <tom@neuro-logic.com> To: Suse <suse-linux-e@suse.com> Date: Sat, 01 Nov 2003 20:17:10 -0800 Subject: [SLE] How do I extract a directory from a tar file
I backed up my /home directory to backup.zip. Rather than pull everything out, right now I only want to pull out my /images folder. It's under /home/tom/images.
How, if I can, do this?
Thanks, Tom
If the directory is stored in the tar file as: home/tom/images you can extract the directory as follows: tar xf name-of-tar-file home/tom/images and that is all it will extract. Ken Schneider
I'm not sure I understand quite. Is backup.zip a tar.* file ? "file backup.zip" will tell you what type of file it is, if it is a tar file, "tar xfv backup.zip -C /home/tom home/tom/images". Here's what I do "tar jcBpfv /XXX/home.tar.bz2 /home", when I want to extract a directory, "tar jxBpfv /XXX/ home.tar.bz2 -C /home/tom home/tom/images". This says extract /XXX/home/tar.bz2, just the directory /home/tom/images and extract it to /home/tom, that restores /home/tom/images with original permissions and time stamps. Regards Sid. Tom Nielsen wrote:
I backed up my /home directory to backup.zip. Rather than pull everything out, right now I only want to pull out my /images folder. It's under /home/tom/images.
How, if I can, do this?
Thanks, Tom
-- Sid Boyce .... Linux Only Shop.
On Saturday, 01 November, 2003 20:17, Tom Nielsen wrote:
I backed up my /home directory to backup.zip. Rather than pull everything out, right now I only want to pull out my /images folder. It's under /home/tom/images.
How, if I can, do this?
Thanks, Tom
Tom, Take a look at my responses to your OTHER thread!!! Bernd -- "If you want to build a ship, don't drum up the men to gather wood, divide the work, and give orders. Instead, teach them to yearn for the vast and endless sea." Antoine de St. Exupery
On Sat, 2003-11-01 at 23:53, Bernd wrote:
On Saturday, 01 November, 2003 20:17, Tom Nielsen wrote:
I backed up my /home directory to backup.zip. Rather than pull everything out, right now I only want to pull out my /images folder. It's under /home/tom/images.
How, if I can, do this?
Thanks, Tom
Tom,
Take a look at my responses to your OTHER thread!!!
Bernd
Your OTHER thread didn't cover my issue above. I got my 2 issues resolved, so thanks for your help. Tom
On Sat, Nov 01, 2003 at 08:17:10PM -0800, Tom Nielsen wrote:
I backed up my /home directory to backup.zip. Rather than pull everything out, right now I only want to pull out my /images folder. It's under /home/tom/images.
Midnight commander will treat archives as if they were directories. Henry Harpending
participants (5)
-
Bernd
-
Henry Harpending
-
Ken Schneider
-
Sid Boyce
-
Tom Nielsen