About this topic
- Tool
- curl
- Level
- Basic
- Commands
- 6
- Access
- Free
- Source
- curl man sayfası
Commands
curl https://example.com
Downloads the page and prints it to the screen.
curl- transfers data over a URL
https://example.com- address to request
curl -I https://example.com
Fetches only the response headers.
curl- transfers data over a URL
-I- HEAD request: no body, headers only
https://example.com- address to request
curl -L http://example.com
If the server redirects to another address, goes there too.
curl- transfers data over a URL
-L- location: follow redirects
http://example.com- address to request
curl -o page.html https://example.com
Writes the response to the file you name instead of the screen.
curl- transfers data over a URL
-o page.html- write output to this file
https://example.com- address to request
curl -O https://example.com/file.zip
Saves the file under the name in the address.
curl- transfers data over a URL
-O- save the file under its remote name
https://example.com/file.zip- file to download
curl -s https://example.com/robots.txt
Hides progress and error messages, prints only the response.
curl- transfers data over a URL
-s- silent: hide the progress bar
https://example.com/robots.txt- address to request
Start practising
Practise the commands in your browser: learn mode explains every part, exam mode shows only the question.