View previous topic :: View next topic |
Author |
Message |
Jeedo Apprentice
Joined: 02 May 2003 Posts: 202 Location: Akureyri, Iceland
|
Posted: Sun Oct 12, 2003 5:17 am Post subject: how do i extract one folder from an archive |
|
|
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 |
|
|
devon l33t
Joined: 23 Jun 2003 Posts: 943
|
Posted: Sun Oct 12, 2003 5:26 am Post subject: |
|
|
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 |
|
|
Jeedo Apprentice
Joined: 02 May 2003 Posts: 202 Location: Akureyri, Iceland
|
Posted: Sun Oct 12, 2003 5:39 am Post subject: |
|
|
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 |
|
|
devon l33t
Joined: 23 Jun 2003 Posts: 943
|
Posted: Sun Oct 12, 2003 3:17 pm Post subject: |
|
|
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 |
|
|
|