compare_cds - compare and verify cd-rom media


This program is used to compare 2 CD-ROMs. It can compare based on a comparison of the entire cd (every block of data), by comparing the name, size and modification date of each file, or by calculating and comparing the checksum of each file. Note that this program compares CD-ROMs, not audio cds.

For the file comparison methods, the results are presented in three lists, first a list of files that were found on both the master and the copy CDs, then a list of files found only on the master and a list of those files found only on the copy. If two CDs are identical, all the files will appear on the first and no files will appear on the second and third lists.


        compare_cds [ -h | --help ] | [ -r | -d | -c ]


        -h, --help      Display this help message and exit.
        -r              (Raw) caclulate checksum for entire CD-ROM
        -d              (Directory) compare file name, dates and size.
        -c              (Checksum) Compare checksums for each file.


        compare_cds -r

Performs a raw comparison of 2 CDs. It does this by reading every block of data on the CD and calculating a MD5 checksum on the data.

        compare_cds -c

Calculates a list of checksums for every file on the master and copy CDs. It then compares the two lists. The user is given the option of viewing the resulting lists.

        compare_cds -d

Compares the directories of each CD. This methods only ensures that the file sizes and dates are identical. Its does not verify data.


Just copy this script into the directory of your choice. /usr/local/bin is a good choice.

Tested With:

This is known to work on Red Hat v7.2. There are no known issues on other Linux platforms.


Copyright 2000-2002, William Shotts, Jr. <>

This software is part of the project, a site for Linux education and advocacy devoted to helping users of legacy operating systems migrate into the future.

You may contact the project at:


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

$Id: compare_cds.README,v 1.3 2002/02/18 14:18:38 bshotts Exp $