Linux curl command Help and Examples

April 22, 2019

Comments

Adsense

Adsense

Adsense

Adsense

Curl is the most important command-line tool in Linux / UNIX for transfer data to or from a server using various protocols.

Nowadays all most all IT people use curl utility to their work either system adminstrator or developer. It is use under verious script to do work automation and at the same time developer also  use curl utility in the appllication development to get data from different servers or remote host by using various protocols.

Most common supported protocols to curl utility are HTTP, FTP, IMAP, POP3, SCP, SFTP, SMTP, TFTP, Telnet, LDAP, etc.

Curl has capabilities to transfer multiple files at once, so we are using it as very reliable tool for data transfer or featching from different location or remote location.

We can do many more thing using curl utility using various options.

Suggested Reading: curl command Structure

Curl command Syntax:

$  curl  [option]  [url…]

Examples of curl uses:

Download a single file

You can download a file from internet using protocol http, https, FTP, etc. with the curl command.

To download a file from the internet, you can use curl with the option “-o,” and it will download and save the file into your current working directory with the same name an in the remote server.

# curl -O https://linuxconcept.com/pdf_doc.tar.gz

Download multiple files

You can also download multiple files using CURL using the same option “-o” with all files, as shown below:

# curl -O https://linuxconcept.com/pageinfo.html -O https://linuxconcept.com/about_us.html

Use Proxy to download a file

Sometimes you use the proxy to surf the internet, especially in office in that case also you can use the curl command to download the file. You can use CURL like below example to use the proxy network.

# curl -x proxy.linuxconcept.com:8080 -U user:proxyweb -O https://linuxconcept.com/pdf_doc.tar.gz
Satish Kumar

Satish Kumar

I am Satish Kumar, Founder of LinuxConcept. Linux and F.O.S.S enthusiast, love to work on open source platform and technologies.

Adsense

Adsense

Adsense

Adsense

Adsense

Adsense

Adsense

Adsense

Adsense

Related Posts

The 30 most useful Linux commands

This article will introduce some practical and common Linux or Unix command , which is the Linux system administrators normally use the command . This article is not a complete list, but a brief list of commands that can be useful...

15 Practical examples of tcpdump command

15 Practical examples of tcpdump command

The tcpdump is the most essential and powerful command-line network packet sniffing tool. We use it to analyze network packets, capture or filter TCP/IP packets that transferred and received over the network on a specific network interface. It is available in almost...

15 Useful “df” Commands to Check Disk Space in Linux

15 Useful “df” Commands to Check Disk Space in Linux

There are several Linux tools available on the internet to check disk space utilization; we can use any of them. But, Linux has a best built-in command-line utility called “df”. The “df” is the short form of “disk filesystem”, we can get detailed information on used...

0 Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

fourteen − 9 =

News & Updates

Join Our Newsletter

Adsense

Adsense

Adsense

Adsense