I want to curl to download a link, but I want it to skip files that already exist. Right now, the line of code I have will continue to overwrite it no mater what:
curl '$url' -o /home/$outputfile &>/dev/null &
How this can be achieved?
I want to curl to download a link, but I want it to skip files that already exist. Right now, the line of code I have will continue to overwrite it no mater what:
curl '$url' -o /home/$outputfile &>/dev/null &
How this can be achieved?
You can use curl option -C -. This option is used to resume a broken download, but will skip the download if the file is already complete. Note that the argument to -C is a single dash. A disadvantage might be that curl still briefly contacts the remote server to ask for the file size.