-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

|I would like to know if wget would download a file correctly even if the
|power goes off in the middle.
|
|A few days back I tried to download a pretty big file using "wget -bc
|http://link"; and before the download was completed the power went off. Next
|day download was resumed but the final file was corrupted.
|
|Does wget handle a situation where the power supply could go off just when
|the contents are being written to the disk or is there any way to get
|around the problem ?

Hi, very funny question if you have programming knowlage.
1. Wget "save" all it get to disk
2. The operating system cache the writen content (write back can be 
forced with flush)
3. Hard disc cache with about 64k - 2mb the data it read/write (can be 
disabled)

Using flush after each write and disable the hardisk cache are big slow 
down and both are not used.

If you do not have an USV, how should wget know that the power fails ?

After restart it can only relay on the assumption that the size of the 
file is the data that are correct downloaded.
But power fail can causre sometimes (most when current write processes 
in progress) data inconsistens.
So there are no real (or without much speed drawback) way to handle this 
extreme situation.

Cu Thomas Lu�nig
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9WYEeBZl9gXHZBTcRAtksAJ9StMcsB/+fqNZDDzJwd4GDzIthSwCfeyrZ
un9zkOd+p2wRWPxEF5OdQTw=
=J2rw
-----END PGP SIGNATURE-----


Reply via email to