Quote:
Originally Posted by
raylier
~#hello -all,
Many UNIX/Linux/BSD/etc books warn about turn off the puter without a proper shutdown. This can damage files which are open at that moment. Seems logical to me. My question is.. does the system warn you when there are damaged files when the system is up again? I had a power failure this week (twice) while my Linux and freeBSD servers were running. (for study so no power backup). Everything works fine. But is it possible that there are damaged files I don't know of but can cause trouble later on? Thanks for reading.
They will have checked and repaired themselves. It can tell, because it leaves a flag for itself to check whether the filesystem was unmounted safely or not. Your system would refuse to boot if it couldn't repair them.
The damage isn't completely random. It happens when a filesystem operation was left half-finished because of a power-failure or other crash. This means that, if anything happened, things(files or folders) which were being often modified are the most likely to be damaged, truncated, or missing.
This also means that a partition which almost never gets written to is very unlikely to be damaged by a power outage. This is one good reason to split up your system into partitions instead of lumping everything into /...