Skip to main content


skip a #curl transfer

- If the target file already exists on disk, skip downloading it.

daniel.haxx.se/blog/2024/08/17…

#curl
This entry was edited (3 months ago)

daniel:// stenberg:// reshared this.

in reply to daniel:// stenberg://

Interesting! By default if a download fails halfway through, will there be a partially downloaded file kept around?

Meaning if I run this command the first time kicking off a download, but this download fails, the 2nd time I run it'll always skip since the file exists already.

in reply to daniel:// stenberg://

Gotcha, thanks! 🙇‍♂️ Then it'll be important for users to understand the various ways to skip or resume downloads! Awesome that curl allows for this flexibility! 🎉
in reply to daniel:// stenberg://

Wouldn't a resume option do the same and more?

I could see where skipping files could be useful, but imho it's easy to deal with in scripts, resuming OTOH isn't and would skip files if the size match (possibly with a variant to skip if length can't be pre-determined or transfer can't be resumed...).

in reply to Thomas Guyot-Sionnest

@dermoth If the protocol and the URL support resume, then it is similar yes. Two conditions that complicate matters and might make this option useful to people.