Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Looking at the options of xz and lzma, I can't for the life of me figure out how to compress multiple files into one archive. I know it is possible because I've uncompressed a .lzma file and it opened a ton of songs.
If i try doing lzma -k file file file file it just compresses each one individually. Is there an obvious option or argument I'm missing?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

One thing you could do is use tar:

tar cf files.lzma --lzma file1 file2 ... fileN

Or, simpler,

tar cf files.lzma --lzma file*

That creates the files.lzma archive which you can then unpack using:

tar xf files.lzma
share|improve this answer
It's worthwhile to point out that, unlike zip, rar, arj on windows et al the common tools on unix/linux systems operate on streams, hence commonly have no option to create a single archive file. –  tink Jan 22 '13 at 19:12
@tink what common tools are you referring to? gzip and tar can. –  terdon Jan 22 '13 at 19:16
gzip, bzip2, compress ... I can't see any mention of compressing several files into one archive using gzip alone. Concatenating the content of several files into one using -c with a redirect doesn't count :) –  tink Jan 22 '13 at 21:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.