Hands-on task
This task is step 2 of the course “curl and HTTP APIs”
Download a file, keeping its name
The server serves a file at http://localhost/files/report.txt. Download it into the /root directory, keeping the original filename (report.txt) — so you should end up with /root/report.txt.
The server shows up in the Site tab too: the browser will show the file, but you need to save it with curl in the terminal.
Reference:curl
What you'll practise:
- curl
- http
- file download
- filename from url