I never quite remember it – extracting a specific file from tar archive

I always forget, and this blog is meant to help me remember.

Found in Tar’s manual, are these simple directives:

Have a file called file.tar, do:

tar -xf file.tar full/path/without/trailing/slashes

It can be a file or directory. You can have a list of files, such:

tar -xf file.tar home/me home/you home/us/important-file

Should do the trick.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.