Use curl to download a webpage (e.g., Google's homepage) and save it as index.html. (Use cat index.html to verify)

1 min read
Use curl
to Download a Webpage and Save it as index.html
bashCopyEditcurl -o index.html https://www.google.com
curl
→ Command-line tool to fetch data from a URL.-o index.html
→ Saves the downloaded content asindex.html
.
Step 2: Verify the Downloaded File
bashCopyEditcat index.html
- This prints the contents of
index.html
, which should contain the HTML source of Google’s homepage.
0
Subscribe to my newsletter
Read articles from Ravi Vishwakarma directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
