Quote:
Originally Posted by skarthik_d
Hi,
Dunno if this has already been discussed but can anyone tell me if there is any utility/command to find a corrupted file in an unix directory.
With smile,
karthik
In Sun's Solaris, they have a utility that keeps a checksum (I think it's a checksum) of all the files you have chosen to install from their distributions, and a command can check if a file has a different checksum from what it is supposed to have. [I forget, right now, what it is called. Sun's "BigAdmin" will know.]
The other UNIX variants either have something similar, or you can create one quite easily. A "crafted"
find command (or a little script) can "exec" a checksum on each file on your system and store the results. Another
find command (or another script) can compare the current checksum with what you have in the "results" from the original "scan".
This is not perfect, but it will give a good indication of a file being changed or tampered with.