curl's Examples

curl is a command line tool to trnasfer data or to from a server. it is used for automation as it is designed to work with user interaction.

curl https://www.file.org

to get a response www.handbook.com

curl www.handbook.com

every file taht is on the internet has a filename.to use  the same filename as the downloaded filename we use -o flag

curl -o www.handbooks.com

download the latest images

curl www.google.com -z "dd-mm-yyyy"

resume the transfer by using the -C flag

curl -C 1024 www.handbook.com/files/largefiles.mpv -o

resume the transfer by using the -C flag

curl -C 1024 www.handbook.com/files/largefiles.mpv -o

-T flag is used to upload a fileto the server 

 

curl -T uploadfile.txt http://upload.linuxhandbook.org/files

-X flag is used to delete a file from the servr

curl -X DELETE http://upload.linnuxhandbool.org/files/deletefile.txt

-L avoids redirects of the site

curl -L http://www.google.com

avoids certification validation

curl -K https://www.google logo.com

DevOpsSchool
Typically replies within an hour

DevOpsSchool
Hi there 👋

How can I help you?
×
Chat with Us