Only fetch if the remote file is newer than a local file.
Section: Response Inspection
Conditional request by modification time
bash
bash
curl -z local-copy.txt -O https://example.com/local-copy.txtExplanation
`-z` uses time conditions such as If-Modified-Since.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Response Inspection
Conditional request with ETag
Use a saved ETag to avoid downloading unchanged content.
Request compressed response
Ask the server for a compressed response body.
Verbose HTTP/TLS details
Show detailed request and response conversation.