curl --max-time 10 -o file.bin https://example.com/file

Category: Web App Development

curl --max-time 10 -o file.bin https://example.com/file

Download with a hard timeout to a file

Downloads the URL into file.bin and aborts if the transfer takes longer than 10 seconds. The --max-time flag caps the whole operation, unlike --connect-timeout which only bounds the connection phase. Combine with --retry for resilient downloads.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.