Home > Command & Utility > Tar: extract one or more files from an archive

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.

Bookmark and Share

No related posts.

Filed Under: Command & Utility

Leave a Comment









*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word




Categories

Archives

Meta