1 Long: max-filesize 2 Arg: <bytes> 3 Help: Maximum file size to download 4 Protocols: FTP HTTP MQTT 5 See-also: limit-rate 6 Category: connection 7 Example: --max-filesize 100K $URL 8 Added: 7.10.8 9 --- 10 Specify the maximum size (in bytes) of a file to download. If the file 11 requested is larger than this value, the transfer will not start and curl will 12 return with exit code 63. 13 14 A size modifier may be used. For example, Appending 'k' or 'K' will count the 15 number as kilobytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes it 16 gigabytes. Examples: 200K, 3m and 1G. (Added in 7.58.0) 17 18 **NOTE**: The file size is not always known prior to download, and for such 19 files this option has no effect even if the file transfer ends up being larger 20 than this given limit.