How to extract one single file from a tar.xz file?
-
You can do this graphically with the archive software that was bundled with your distro. Open the tarball in the archive program and the interface will be like using the file manager. Navigate to the file you want, select it, and extract it (usually a menu and/or right-click action).– fixer1234Jan 3, 2016 at 18:34
2 Answers
-
Is there a way to tell tar to stop after the file was extracted? It seems, it decompresses the whole tar, even though the file asked for was already found... However in our case the tar.bz2 is huge, but the requested file is small and at the beginning of the tar... Jun 21, 2021 at 13:16
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: http://www.tecmint.com/extract-tar-files-to-specific-or-different-directory-in-linux/
-
1