Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a collection of mailing list archive files all gzip'd, they're in a nested directory structure that starts with what appears to be a blank folder/jargon name.

The files are here:

It appears to look like this at the header of each file:


I've tried using 7Zip, WinRAR and gzip on Windows 7, via the command line.

Also gzip on OS X, with the same results, am I missing something obvious? I haven't been able to get to rebuild out the directory structure, the result appears to be a merging of the directory structure and the file.

If you get it working can you let me know what:

  • Operating System you used
  • Compression/Decompression tool
  • The command line arguments or automation method

I want to do this in 1 go, or automated, not having to enter each file through a GUI application.

share|improve this question
NOTE: If you stumble upon this question while trying to resolve something on RabbitMQ try a live search of the mailing list with Google site based search, example query:… – Nick Josevski May 9 '11 at 6:24
up vote 6 down vote accepted

The file is gzipped twice. Try these commands on Mac OS X or Linux:

gzip -d 2011-May.txt.gz

You should end up with the file 2011-May.txt which is plain text. On my system, wget is properly saving a singly-gzipped file which decompresses to plain text.

If you have the double-gzipped file already, you can run this command:

gzip -cd 2011-May.txt.gz | gzip -cd > 2011-May.txt

This will decompress the file twice and write it. Alternatively, on Windows 7, you should be able to use 7zip to decompress the gzipped file, then open it again with 7zip and decompress it again. You should be left with the uncompressed file.

If you have a large number of files like this in one directory, you could do something like this:

for file in *.gz; do mv $file $file.gz; done;
gunzip *.gz
gunzip *.gz

This will rename all files that end in *.gz to *.gz.gz, then run gunzip on them twice.

share|improve this answer
Awesome, thanks Stephen, I had a suspicion it was something like that but didn't know about, piping gzip into gzip worked fine. – Nick Josevski May 9 '11 at 6:12
No problem. Your question finally taught me how gzip's command line worked, so I learned too. – Stephen Jennings May 9 '11 at 6:28
Nice work on a batch approach too, I just ended up redirecting all the output of gzip into 1 file anyway, which was going to be my next step with all the individual files. – Nick Josevski May 9 '11 at 6:30

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.