Name

curl

Synopsis

    curl [options] [URL ...]

curl retrieves files from the Internet, most often using FTP or HTTP. It has a plethora of options, making it difficult to use easily. One of curl’s main strengths is that it may be used to automate file uploading. See also wget.

URLs: http://curl.haxx.se and ftp://ftp.sunet.se/pub/www/utilities/curl/.

Primary Options

For many of the options, using them multiple times toggles the behavior, turning a particular mode off if it was on or vice versa.

--connect-timeout seconds

Limit the connection phase to seconds seconds.

-Coffset, --continue-atoffset

Continue a previous file transfer at offset bytes. May be used with both downloads and uploads. Use -C - to have curl automatically determine the offset.

--create-dirs

When used with -o, create local directories as needed.

--disable-epsv

Do not use the EPSV FTP command for passive FTP transfers. Normally, curl tries the EPSV command before the PASV command.

-f, --fail

Fail silently upon HTTP server errors. Mainly useful for scripts.

--ftp-pasv

Use the FTP PASV command. This is the default.

-h, --help

Print a (relatively) brief help message.

-Kconfigfile, --configconfigfile

Use configfile as the configuration file, instead of the default $HOME/.curlrc. Use - to read configuration information from standard input.

--limit-rate speed

Limit transfers to speed. The default units is bytes per second, but you may use a trailing k or K for kilobytes, m or M for megabytes, or g or G for gigabytes. The -Y option overrides ...

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.