Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how do i extract one folder from an archive
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Jeedo
Apprentice
Apprentice


Joined: 02 May 2003
Posts: 202
Location: Akureyri, Iceland

PostPosted: Sun Oct 12, 2003 5:17 am    Post subject: how do i extract one folder from an archive Reply with quote

hmmm, i just made a "boo boo" i deleted a folder accedentally from a folder for which i have a backup of, but i cant extract the while folder because it is too big, can i extract one folder from a tarball only?

if this cant be done any workarounds would be appriciated, like deleteing stuff that gets created except it's name is "foldername"
Back to top
View user's profile Send private message
devon
l33t
l33t


Joined: 23 Jun 2003
Posts: 943

PostPosted: Sun Oct 12, 2003 5:26 am    Post subject: Reply with quote

Try this.
Code:
$ tar -xvf file.tar directory-to-untar

For an example, I want to untar only the src directory of the sh-utils-2.0.tar.gz file.
Code:
$ tar -xzvf sh-utils-2.0.tar.gz sh-utils-2.0/src
Back to top
View user's profile Send private message
Jeedo
Apprentice
Apprentice


Joined: 02 May 2003
Posts: 202
Location: Akureyri, Iceland

PostPosted: Sun Oct 12, 2003 5:39 am    Post subject: Reply with quote

That worked fine for a single file but didnt for a whole directory of files. which is what i am trying to extract
Back to top
View user's profile Send private message
devon
l33t
l33t


Joined: 23 Jun 2003
Posts: 943

PostPosted: Sun Oct 12, 2003 3:17 pm    Post subject: Reply with quote

It works fine for me to extract the sh-utils-2.0/src/ directory and all files in it. Did you type the full path of the directory that the tar file used?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum