Curl is a Linux Command-Line tool used to transfer data over the server, using any of the supported protocols (HTTP, FTP, IMAP, POP3, SCP, SFTP, SMTP, TFTP, TELNET, LDAP or FILE). This tool/command is preferred for automation since it runs without any user interaction. Curl is capable of transferring multiple files at once.
Syntax:
The above command must display the content of the given URL in the terminal. The URL syntax is protocol dependent and multiple protocols can be written in a set as follows:
Progress Meter: The curl command displays a progress meter during its use to indicate the transfer rate, the amount of data transferred, time left, etc. To display the progress bar along with the curl command, the -# option is used.
-O option: The -O option saves the retrieved data in the local machine with the name provided in the parameters.
Syntax:
Example:
-C option: This option is used to resume the downloads which had been stopped due to some reason. This command is very useful when downloading large files.
Syntax:
Example:
-limit-rate option: This option controls the upper limit of the rate of data transfer and keeps it close to the value given along with the command.
Syntax:
Example:
-u option: This option allows the user to download files from user authenticated FTP servers.
Syntax:
Example:
DICT Protocol - Curl defines a DICT Protocol which can be used to easily get the definition or meaning of any word directly from the command line.
Syntax:
Example:
Comments