curl command examples

I post a few curl command example for future reference

curl -f –create-dirs -o /path/to/local/file http://foo.com/path/to/remote/file

-f: fail silently on server errors.

–create-dirs: create missing directories

-o: the path of the local file

curl -f -v –user “username:password” –upload-file /path/to/local/file http://foo.com/path/to/remote/file

–user: specify the username and password

–upload-files: used to upload files