|
|||||||||
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
learn unix and linux commands |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
extract a sub directory form a tar file
anyone know if it is possable to extract a subdirectory in a tar file.
IE tarfile contains parent dir -sub dir A -sub dir B I want to extract sub dir B. |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
The following should work:
tar xvf tarball subdirB From a typical tar(1) man page: x Extracts the named files from the tape. If a named file matches a directory whose contents were written to the tape, this directory is (recursively) extracted. ..... |
| Sponsored Links | ||
|
|
|
#3
|
||||
|
||||
|
thanks Murphy. i guess i should have read the man page a bit more carfully instead of scanning it.
|
| Sponsored Links | ||
|
|
![]() |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to read and append certain files form directory | lio123 | Shell Programming and Scripting | 2 | 02-09-2011 02:33 PM |
| Extract directory from a file path | mrudula009 | Shell Programming and Scripting | 4 | 06-10-2009 02:48 AM |
| How to extract visually blank lines form the file | hadsuresh | Shell Programming and Scripting | 1 | 06-20-2008 09:59 AM |
| extract last modified time of file in form of YYYYMMDD | itsme_maverick | Shell Programming and Scripting | 3 | 05-28-2008 01:01 PM |
| extract one file form .tar.gz without uncompressing .tar.gz file | balireddy_77 | Shell Programming and Scripting | 2 | 07-10-2007 05:23 AM |
|
|