max-filesize.d 857 B

1234567891011121314151617181920212223
  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 will not start and curl will
  15. return with exit code 63.
  16. A size modifier may be used. For example, Appending 'k' or 'K' will count 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**: The file size is not always known prior to download, and for such
  20. files this option has no effect even if the file transfer ends up being larger
  21. than this given limit.