Skip to content

emka.web.id

Menu
  • Home
  • Indeks Artikel
  • Tutorial
  • Tentang Kami
Menu

Top 5 cURL Command Examples

Posted on July 09, 2018 by Syauqi Wiryahasana
Curl  is a computer software project providing a library and command-line tool for transferring data using various protocols. The cURL project produces two products, libcurl and cURL. It was first released in 1997. The name stands for "Client URL". The original author and lead developer is the Swedish developer Daniel Stenberg. cURL supports various protocols like, DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. Every Linux Distribution or Unix-Like operating system nowaday have curl pre-installed because of this wide implementation across platform. This is top 5 Curl Command by Example to try:

1. Stdout a web content

you can print/display website content by URL in terminal with simple curl command: curl http://www.linux.com to store the output in a file, you can use simple redirect operator like this example: curl http://www.linux.com > linux.com.html

2. Download File

We can download file from internet with curl, using -o or -O options. This is the differences between those two commands:
  • -o , curl will save the file with filename provided in the command line
  • -O , curl will take the filename from URL
example: curl -o index.html http://www.linux.com
  1. Download multiple file
to download multiple file, you can use more than one -O options. example: curl -O url1 -O url2

4. Resume Download

One of the best feature of Curl is Resume Download from the previous URL. To use this feature, you have to use -C - options (beware, there is - sign in the end). Example: curl -C - -O download.iso http://www.linux.com/download-linux.iso

5. Limit transfer rate

To limit transfer rate when downloading content from internet, use --limit-rate options followed by limit rate in byte per second. Example curl --limit-rate 750B -O http://www.linux.com/download-linux.iso curl will download ISO file with transfer rate max to 750 byte/seconds
Seedbacklink

Recent Posts

TENTANG EMKA.WEB>ID

EMKA.WEB.ID adalah blog seputar teknologi informasi, edukasi dan ke-NU-an yang hadir sejak tahun 2011. Kontak: kontak@emka.web.id.

©2024 emka.web.id Proudly powered by wpStatically