curl may support file skips when used with -O and -J , but its behavior is incompatible.
-J ( --remote-header-name ) basically tells the -O ( --remote-name ) option to use the specified Content-Disposition server name, rather than retrieving the file name from the URL. Thus, curl does not know which file name will be returned by the server, so it can ignore an existing file for security.
Source: Re: -J "Failure to overwrite ..."
For example:
$ curl -LJO -H 'Accept: application/octet-stream' 'https://api.github.com/repos/x/y/releases/assets/12345 Warning: Refusing to overwrite my_file.bin: File Warning: exists curl: (23) Failed writing body (0 != 16384)
However, as already mentioned, its behavior is unpredictable and does not work for all files.
kenorb
source share