When I do wget twice, it does not overwrite the file but instead appends a .1 to the name.
$ wget https://cdn.sstatic.net/askubuntu/img/logo.png
...
Saving to: ‘logo.png’
...
$ wget https://cdn.sstatic.net/askubuntu/img/logo.png
...
Saving to: ‘logo.png.1’
...
I want wget to overwrite the logo.png file:
- Regardless if it exists already
- Regardless if it isn't changed on remote server, want it to be re-downloaded again (can't use -N flag)
- Regardless if file size is same, it is downloaded everytime with wget and replaced.
- Does not append .1 at the end of name. Keeps the same name evertime (logo.png)
- Can't use cURL or something else.
- Preferably not using the -O flag as i want to keep the original name of the file.
Is there still a way to do it? I searched but couldn't find an example?