Re: Extracting indiviual files or directories from XYZ.tar.xz - Possible?
Hi,
Richard Owlett wrote
> 1. Can individual files or directories be extracted from XYZ.tar.xz ?
Look up exact path of your file, like with:
tar tJf XYZ.tar.xz | less
and the search capabilities of "less".
Or by:
tar tJf XYZ.tar.xz | '...some.search.expression...'
Go to a directory from where the (usually) relative path leads to
the desired storage location.
Extract the desired path:
tar xJvf XYZ.tar.xz ...path.of.desired.file.as.shown.by.tar.tJf...
Multiple paths are allowed. Like:
tar xJvf XYZ.tar.xz dir/x other/dir/y
Due to the sequential nature of compression and tar, the whole
archive will be uncompressed and read with each such run. This may last
substantial time.
> 2. Is there a compressed format that makes above convenient?
Depends much on what you perceive as convenient.
I use for backup ISO 9660 with zisofs compression which is recognized
automatically by Debian's Linux kernels.
So i can use arbitrary file tools to inspect and copy out files
from my backup ISOs after having mounted them by normal means.
Have a nice day :)
Thomas
Reply to: