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

lets say there is one very big file on some server and i just want to download first 1MB. How can I do it on Linux ?

share|improve this question
Originally asked on SO:… – David Z Aug 19 '10 at 5:49

If the server supports it, curl -o filename -r 0-1048575 http://url/to/file will just download the first MB.

share|improve this answer
i like this better than my answer :-P – sml Aug 19 '10 at 5:58
wget URL

then Ctrl + c when about 1MB has been written.

If you want exactly 1MB, then you can run the downloaded chunk through split

split --bytes=1048576 FILENAME

you can even pipe wget into split so that the file gets saved as 1MB chunks as it downloads... see the man pages.

share|improve this answer

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.