[CentOS] Directory compare

Les Mikesell lesmikesell at gmail.com
Mon Jun 23 05:53:43 UTC 2008

Walid wrote:
> 2008/6/23 Spiro Harvey, Knossos Networks Ltd <spiro at knossos.net.nz>:
>>  I have 2 drive sets that are supposed to be identical [I use CentOS 5]:
>>> A: 1.6Tb
>>> B: 1.49Tb
>>> I need to find the differences, any suggestion?
>> diff will do it.
>> diff -q /dir-a/ /dir-b/
>> the -q will just tell you what files are different, not what's different
>> inside the files.
> I would like to do the same among two, several boxes, that is take thier dir
> listing to a certain depth, and compare it for differences as an integrity
> check that they have the same installation files?

cd /path/to/check
rsync -essh -avn . host:/path/to/check

The -n option says not to actually copy anything, -v says to print the 
filenames where there are differences.

   Les Mikesell
     lesmikesell at gmail.com

More information about the CentOS mailing list