LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   File test to make sure files aren't damaged/corrupt (https://www.linuxquestions.org/questions/linux-newbie-8/file-test-to-make-sure-files-arent-damaged-corrupt-251086/)

bluedevlx 11-04-2004 11:49 AM

File test to make sure files aren't damaged/corrupt
 
Are there any unix commands to check the integrity of files?

Scenario:
There is a directory with nearly 50 files and you must copy them from the source to a destination but when you goto copy them it begins copying up to the first 100MB and then hangs resulting in a CTRL + C to cancel. And then you go directly to the last file that it stopped copying and you try to pull it over manually but it will not go because it's damaged/corrupt. Now you know that there are atleast 10 files out of these 100MB that are corrupt and you don't really want to sit there and have to copy all over again and when you do get to the next damaged file you bypass it and start copying everything over again. Now I didn't mention that when you copy you're only able to copy everything in one shot and those files that are damaged you add to en exclude file. So basically you'll sit there for hours waiting and waiting and then wam* you get hit with a screen that is stuck on one file so now you have to cancel the copy and add that filename to the exclude list.

Solution to this would be to create or find a file integrity checker that can check each file in a directory to make sure they aren't damaged/corrupt.

Now does anyone happen to know of the command to test a file for erroneous bytes that will cause it not to be accessable or used? I'm trying to figure out which command can do this.

Oliv' 11-04-2004 01:11 PM

md5sum :)

Oliv'


All times are GMT -5. The time now is 11:49 PM.