Linux – Why does wget from ftp-sites sometimes create a few empty files when it downloads the rest of the files without problems

ftplinuxredhatwget

I have downloaded 80.000+ image files stored on a FTP-site using wget(1) and most of the files where downloaded without problems but when I did a small check (using file(1)) I just realized that a few of the files were empty!?!

I just used this command:

wget -r -nH --user YYY --password ZZZ ftp://X.X.X.X

I would have expected the ftp transfer either to retry or/and eventually fail. Is this a bug in wget(1) og in the ftp-protocol?

I can see others have the same problem!

Best Answer

Well I'm not sure why the files are empty but you can try wget -c 'ftp://image-link' with all the links it should re-download/resume corrupted files only.