mirror of
https://github.com/cheat/cheat.git
synced 2024-11-16 08:58:28 +01:00
Merge pull request #111 from jonlabelle/master
Add cheatsheet and examples for curl.
This commit is contained in:
commit
b2f706ac18
1 changed files with 24 additions and 0 deletions
24
cheatsheets/curl
Normal file
24
cheatsheets/curl
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Download a file preserving the filename.
|
||||
curl http://example.com/file.zip -O
|
||||
|
||||
# Download a file and specify a new filename.
|
||||
curl http://example.com/file.zip -o new_file.zip
|
||||
|
||||
# Fetch only the HTTP headers from a response.
|
||||
curl -I http://example.com
|
||||
|
||||
# Download all sequentially numbered files (1-24)
|
||||
curl http://example.com/pic[1-24].jpg
|
||||
|
||||
# Download a file from FTP.
|
||||
curl -u username:password -O ftp://example.com/pub/file.zip
|
||||
|
||||
# Get an FTP directory listing.
|
||||
curl ftp://username:password@example.com
|
||||
|
||||
# Resume a previously failed download.
|
||||
curl -C - -o partial_file.zip http://example.com/file.zip
|
||||
|
||||
# Fetch your external IP and network info. as JSON.
|
||||
curl http://ifconfig.me/all/json
|
||||
|
Loading…
Reference in a new issue