[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Extracting indiviual files or directories from XYZ.tar.xz - Possible?



On Thu, Aug 07, 2025 at 10:01:01 -0500, Richard Owlett wrote:
> XYZ.tar.xz is only file in current directory.
> I have launched mc from the command line.
> How do I extract from XYZ.tar.xz  all files that originated in directory
> /ABC/qrz/help to the current directory?

I wouldn't use mc for this, if you want it to be automated.  Just use
tar directly.

    tar xJf XYZ.tar.xz 'ABC/qrz/help/*'

This is of course assuming that the files are archived as ABC/qrz/help/foo.
If they are archived as ./ABC/qrz/help/foo then your pattern needs to
begin with ./ and so on.

It would help *tremendously* if you would show us the result of

    tar tJvf XYZ.tar.xz | head -n10

> Side note to all:
> Before my initial post here I had Debian initiate extracting *ALL* files in
> XYZ.tar.xz to a flash drive containing only the tar file. I'm letting it
> continue as later I may need as yet unknowable files.
> YES it's slow.

Now there's a Flash drive involved?  What?

Why aren't you doing this on a regular hard drive?


Reply to: