Table of Contents | ||
---|---|---|
|
Overview
curl
is a command-line utility for downloading files from the web. It supports downloading files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS and many other protocols. It is very similar to wget
.
Syntax
Code Block |
---|
curl [options] [URL] |
Basic Usage
To download a file using curl
, simply provide the URL of the file you want to download. Here's the basic command format:
Code Block |
---|
curl [URL] |
For example, to download a file named "example.txt" from a website, run the following command:
Code Block |
---|
curl -O http://www.example.com/example.txt |
The downloaded local file will be named as example.txt , note that if no filename part is specified in the URL, this command using the -O
flag will fail.
For more use cases and a detailed tutorial, please visit https://curl.se/docs/tutorial.html .
Common Options
-o --output <file>
Write to a local file instead of stdout-O --remote-name
Write output to a file named as the same as the remote file
Additional Help
If you require further assistance on this topic, please don't hesitate to contact the Research Computing Team. To create a support ticket, kindly send an email to rtshelp@asu.edu. For quick inquiries, you're welcome to reach out via our #rc-support Slack Channel or attend our office hours for live assistance
We also offer a series of workshops. More information here: Educational Opportunities and Workshops