Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

curl --max-filesize: "NOTE: The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers."

wget --quota: "Note that quota will never affect downloading a single file. However, quota is respected when retrieving either recursively, or from an input file."

These options are not that much different in practice. If single-file size is uber-important, pipe it through something that will break the pipe after the limit point. For ad-hoc scripting usage, wget is almost always more usable than curl IMO. Of course, wget isn't a library.



If you're using http, you can use the range parameter in curl to restrict the number of bytes you download.


Sure, if the server supports it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: