Tar: extract one or more files from an archive
February 22, 2010 Posted by KP
To extract a single file from an archive:
# tar zxvf tarfile.tgz –include=”desiredfile”
Use patterns:
# tar zxvf tarfile.tgz –include=”desiredfile*”
‘desiredfile’ must use full path. To check file’s fullpath:
# tar tf tarfile.tgz
Note: It’s double ‘-’ before include.
No related posts.
Filed Under: Command & Utility