Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 bunch of .raw.gz files which are data files streamed from twitter with JSON interface. I am wondering which command should I use on my Mac OSX to open (unzip) these files? I have tried tar, unzip, gunzip, none of them worked for me.

share|improve this question

migrated from Mar 11 '11 at 21:21

This question came from our site for professional and enthusiast programmers.

But gunzip should give you the .raw file. Then, are you aware of what the .raw file is? – Xichen Li Mar 11 '11 at 20:47
Agree with Xichen. Hence the file use. – Renaud Mar 11 '11 at 20:52
This is what I get when I run gunzip hoktay@csreg193>gunzip twitter_20091006.raw.gz gunzip: twitter_20091006.raw.gz: not in gzip format – Huseyin Oktay Mar 11 '11 at 22:08
up vote 1 down vote accepted

You should try the file command, if that is available on MacOSX, to check the file type. Anyway, I think you should do that after gunziping the x.raw.gz file (which normally gives you a x.raw file). Normally, you should obtain raw json text file after doing gunzip.

share|improve this answer
This is what I get when I rurn the file command: file twitter_20091006.raw.gz twitter_20091006.raw.gz: data – Huseyin Oktay Mar 11 '11 at 22:10
Ouch… Did you try to open the file in text mode and see if there is a human readable text? Could you share how did you get those file? It may help. – Renaud Mar 11 '11 at 22:23
This is the information about how the files are obtained.Files contain singular larger continuous ingestions. Files are in JSON format. curlStream.bat was used with a program called cURL to download the Twitter stream. The Twitter API is located at Most JSON fields are defined at curlStream.bat invokes the Twitter Streaming API, with documentation at – Huseyin Oktay Mar 12 '11 at 4:38
And I tried to open, but it is not human readable text unfortunately. – Huseyin Oktay Mar 12 '11 at 4:39
Ok, I can't test since I don't want to register myself on devtwitter. Anyway, since curl should by default redirect your data on the standard console output my advice is that you could try elementary curl call on the Twitter API when tweaking some curl parameters (see curl -h). – Renaud Mar 12 '11 at 15:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .