3

tar -I pixz -cf foo.tar.xz ./foo compress the Stuff.

tar -I pixz -xf foo.tar.xz decompress the Stuff.

And with pixz -l foo.tar.xz comes a list the contents.

How can i do this with (mc) Midnight Commander?

If i select foo.tar.xz in mc and press Enter, it comes nothing.

The CPU usage goes for a moment high but nothing comes than, no error.

Normaly mc can open archive files like this?

How can mc open and browse an indexed .tar.xz file?

1 Answer 1

3

To let you browse compressed tar files, mc uncompresses them into a temporary tar file and parses that tar file by itself.

For xz files, it uncompresses them as per the:

uxz/1 xz -d < %1 > %3 

Line in /etc/mc/sfs.ini.

Here, it looks like mc's tar parser chokes on the index that pixz adds after the tar file (even though other tar implementations such as GNU tar or bsdtar seem to know how to ignore it).

pixz -d as opposed to xz -d does hide that index upon extraction, so changing that line above to:

uxz/1 pixz -d < %1 > %3 

Does work around the issue.

If you can't edit that file, you could add a ~/bin/xz -> /usr/bin/pixz symlink and start mc as PATH=~/bin:$PATH mc so that whenever mc (or any command started by mc) invokes xz, it actually invokes pixz.

2
  • Thank You, mc can now open .tar.xz files, but "open" is extract them first and than browse into that. i have some very big .tar.xz archies with many files in. is there a way to browse in the index list with mc, and not to decompress them all to brwose? Commented Oct 22, 2024 at 10:30
  • @user447274, I don't use mc myself, but looks like /etc/mc/mc.ext can let you configure how tar.xz files are viewed. Commented Oct 22, 2024 at 10:51

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.