By default when you do an HTTP GET/POST/PUT/DELETE method request using the cURL command, the output is displayed on the console (standard output)
In order to save the output of a cURL command to a file make use of the -o or --output option followed by the filename and the URL.
Example:% curl -o sample.csv https://code2care.org/sample.csv
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 59 100 59 0 0 621 0 --:--:-- --:--:-- --:--:-- 670
% cat sample.csv
1,Sample-1,100
2,Sample-2,200
3,Sample-3,300
4,Sample-4,400

Note: Make use of -O (capital letter O) if you want to save the file as that at the remote location.
Example:% curl -O https://code2care.org/sample.csv
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 59 100 59 0 0 612 0 --:--:-- --:--:-- --:--:-- 655

Have Questions? Post them here!
- Get cURL command from Chrome Inspect Network HTTP URL
- Downloading Google Chrome using cURL Command
- Get the Size of HTTP Response using cURL Command (Content Length)
- How to set Connection and Max Timeout for cURL Request with Examples
- Hide cURL Outputs and Errors on Terminal
- cURL Example using IP (IPv4 and IPv6) address and Port
- Perform Basic Authentication using cURL with Examples
- Efficient way to perform HTTP cURL GET/POST Requests with Payload
- trurl: A new command-line tool for URL parsing and manipulation by cURL Developer
- Trace using cURL Command Example
- Fetch only content-type using cURL Command
- cURL Option to show HTTP Response Status Code
- [fix] command not found curl
- How to get cURL Command to run in verbose mode?
- Save cURL Command Output to a external file
- List of 28 Protocols supported by cURL with Examples
- URL Encode cURL HTTP GET\POST Data with Examples
- How to Pretty Print cURL JSON Output in Terminal
- Fix Power Automate FLOW error - InvalidTemplate Unable to process template language expressions in action - Microsoft
- What is Android Toast.LENGTH_SHORT and Toast. LENGTH_LONG durations - Android
- Clone Bitbucket repo in VS Code - HowTos
- Android Installation error: INSTALL_FAILED_OLDER_SDK on Device - Android
- How to enable Do Not Disturb (DND) mode in Microsoft Teams - Teams
- Java code to check Internet Connection on Android Device Programmatically - Android
- How to hide lines in Notepad++ - NotepadPlusPlus
- Format Code in Visual Studio - VS Code [Mac/Windows/Linux] - HowTos