Skip to content

Instantly share code, notes, and snippets.

@trentbrooks
Created September 22, 2014 01:17
Show Gist options
  • Save trentbrooks/90e7423df16af7222178 to your computer and use it in GitHub Desktop.
Save trentbrooks/90e7423df16af7222178 to your computer and use it in GitHub Desktop.
Curl download/email/form post commands
DOWNLOAD A FILE (big O)
curl -O http://www.trentbrooks.com/index.html
DOWNLOAD A FILE TO DIRECTORY/FILENAME (little o)
curl -o GitProjects/thatpage.html http://www.trentbrooks.com/index.html
SEND FILE ATTACHMENT WITH GMAIL
curl smtps://smtp.gmail.com:465 -v --mail-from "[email protected]" --mail-rcpt "[email protected]" --ssl -u [email protected]:PASSWORD -T "test.txt" -k --anyauth
FORM POST: http://superuser.com/questions/149329/what-is-the-curl-command-line-syntax-to-do-a-post-request
curl --data "param1=value1&param2=value2" http://example.com/resource.cgi
curl --form "[email protected]" http://example.com/resource.cgi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment