max-filesize.d 856 B

12345678910111213141516171819202122
  1. c: Copyright (C) 1998 - 2022, Daniel Stenberg, <[email protected]>, 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. ---
  12. Specify the maximum size (in bytes) of a file to download. If the file
  13. requested is larger than this value, the transfer will not start and curl will
  14. return with exit code 63.
  15. A size modifier may be used. For example, Appending 'k' or 'K' will count the
  16. number as kilobytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes it
  17. gigabytes. Examples: 200K, 3m and 1G. (Added in 7.58.0)
  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.