I always use wget -c to download a file which enables the download by appending whenever needed from the last position of download.A file is downloaded 30%. Then after network occupancy it started appending some junk to the file at the end and reached till 40%. (Junk added due to the file server's logic to give crap data after 30mins).Now, I have got a new url location with some new token available for next 30mins for the same file. How can I continue downloading the same file but started from 30% onwards ?Or is there any application which does that?ex: $ wget -c http://xyz.com/file.txt?token=130% [=============>                                 ]40% [=================>                             ] (10%junk added)^C - cancelled$ wget -c http://xyz.com/file.txt?token=2 --from='30%'31% [+++++++++++++=>                               ]Note :-  --from='30%' is just for example if can be done. there is nothing like that argument exists in wget
Download by appending after some percentage completion
linux;wget;download
wget -c / --continue always continues with the given filesize, but you can change that:Use truncate to reduce the file back to the original 30% size (you have to specify the size in bytes or kbytes). Or you can use head -c SIZE file > file_30pc, which does not touch the original file (but then you have to rename it).And as BlueManCZ suggested, you might want to use -O output-file to make sure it is the same file.Note: Using --start-pos instead of -c/--continue to specify the last good position will not work, instead it creates a new file from that position onward, it does not append an existing one (it will even override if you specify -O).