3 ms·
What about, for example, a source file that needs to be downloaded and diffed from the web? What about when you need to pull stuff from a database? You can hack
by makmanalp 9y ago
What about, for example, a source file that needs to be downloaded and diffed from the web? What about when you need to pull stuff from a database? You can hack your way around but it's not the most fun.
- falcolas 9y agoWRT the web file, curl can be run and only download a file if the file has been modified after the file on disk. DB are harder (yet possible) but not a common request that I’ve seen.
- makmanalp 9y agocurl -z only works if the server has the proper headers set - good luck with that. The point is, it's great to be able to have custom conditions for determining "needs to be updated", for example.
- ycombobreaker 9y agoYou can always download to a temporary location and only copy to the destination file if there is a difference. You don't need direct support from curl or whatever other tool generates the data.