Finding corrupted files

Corrupted or damaged files can cause some of the following problems in Mac® OS X:

  • Applications to crash or quit unexpectedly when opening a corrupted file.
  • Indexing failures when using:
    • Spotlight® under Mac OS X 10.4 Tiger® or later.
    • Content Indexing and Find By Content under Mac OS X 10.3 Panther® and earlier.
  • System freezes, hangs, or kernel panics in the case of corrupted System components.

The following techniques can often help identify potentially corrupted files.

Anti-virus software

Anti-virus software cannot examine corrupted or damaged files. This makes it an ideal tool for finding such files.

For example, Symantec® Norton AntiVirus® — a recommended anti-virus solution — will return the message "The file is damaged" in the Comment field of the Virus Scan window when a scan encounters a corrupted or damaged file. Selecting a file bearing this comment in the Virus Scan window displays the path to the file in the File Info field.

Run your anti-virus application against the disk, partition, or folder containing the file or files that caused problems. If you are uncertain of the corrupted file's location, use your anti-virus solution to scan the entire drive or partition on which problems are occurring.

Backup and Recovery software

Backup and Recovery applications generally produce execution errors showing corrupted or damaged files when creating backups. If your backup and recovery application maintains a log of files it could not backup, check the log for potentially corrupted files.

For example, SuperDuper!, a recommended backup and recovery application, will post to its log a message similar to the following example if it encounters a corrupted or damaged file:

| 00:00:08 PM | Error | ditto: /path_to_bad_file: Input/output error

where /path_to_bad_file is the path of the corrupted file.

Time Machine® will post a message to system.log similar to the following example if the backup was not performed due to a corrupted or damaged file:

Error: (-36) SrcErr:YES Copying /path_to_bad_file to (null)

Roxio® Retrospect® for Macintosh® — another third-party backup and recovery application — will post a message similar to the following example in its Operations Log if a corrupted or damaged file is encountered:

  • Can't read file “bad_file_name”, error -36 (i/o error, bad media?), path: “/path_to_bad_file”.
Did you find this FAQ helpful? You will find a wealth of additional advice for preventing or resolving Mac OS X problems in Dr. Smoke's book, Troubleshooting Mac® OS X.
Use of this site signifies your agreement to the terms of use.