extract file from tar
I want to extract a file from tar file , if I use tar -xvf will extract all files , if I want to only extract a directory , can advise what can i do ? thx
|
|
have you read the output of these two commands
Code:
tar --help i can tell you how to grab 1 file using Gnome or kde ( file roller or ark ) just double click on the file and extract that 1 file . |
Quote:
a similar approach should work for packed directories, though for very nested directories you need to pass the pathname relative to the tarball, I guess. Linux Archive |
How to extract directory from tgz directory within tgz file?
I have a very large backup.tgz file that contains another file dirs.tgz and I would like to extract a directory within the dirs.tgz file.
I can accomplish this by tar -xzvf backup.tgz then tar -xzvf dirs.tgz The problem is that it takes hours to exract the files, fills up my drive and I only need a directory from the dirs.tgz. Does anyone have a simple command to extract a directory? |
then don't tar.gz the dir. in that tar.gz
that in my opinion is a wast anyway Code:
file1.tar.gz Code:
file1.tar.gz |
Still seeking answer
Thanks for the post, but I'm seeking an answer to my question. I didn't tar the directory to begin with...it is the situation that I've been provided.
|
ust:
===I want to extract a file from tar file , if I use tar -xvf will extract all files , if I want to only extract a directory , can advise what can i do ? thx=== tadosborn: ===Does anyone have a simple command to extract a directory?=== use command: cpio -i to learn how to use it: man cpio Goodluck. Hope this helps. |
OK;
Code:
tar -zxvf backup.tgz dirs.tgz |
All times are GMT -5. The time now is 04:08 PM. |