2
0

max-filesize.d 967 B

1234567891011121314151617181920212223242526
  1. c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  2. SPDX-License-Identifier: curl
  3. Long: max-filesize
  4. Arg: <bytes>
  5. Help: Maximum file size to download
  6. Protocols: FTP HTTP MQTT
  7. See-also: limit-rate
  8. Category: connection
  9. Example: --max-filesize 100K $URL
  10. Added: 7.10.8
  11. Multi: single
  12. ---
  13. Specify the maximum size (in bytes) of a file to download. If the file
  14. requested is larger than this value, the transfer does not start and curl
  15. returns with exit code 63.
  16. A size modifier may be used. For example, Appending 'k' or 'K' counts the
  17. number as kilobytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes it
  18. gigabytes. Examples: 200K, 3m and 1G. (Added in 7.58.0)
  19. **NOTE**: before curl 8.4.0, when the file size is not known prior to
  20. download, for such files this option has no effect even if the file transfer
  21. ends up being larger than this given limit.
  22. Starting with curl 8.4.0, this option aborts the transfer if it reaches the
  23. threshold during transfer.