How to extract one single file from tar.xz

How to extract one single file from a tar.xz file?

1

2 Answers

This should work:

tar -xf file.tar.xz "/file/to/extract.png"

See here for some more syntax.

1

There are many ways to extract specific or selected files from a tar archive file, but the most used way in Linux using tar options as shown:

tar -tf filename.tar.gz filename

For more examples about tar command can be found at:

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like