Comparing directories is useful when two people are working on the same set of files, for example, the chapters of a book. By comparing the directories you can quickly identify which files are different.
To compare two directories, use the
(directory compare) command, as follows:
dircmp directory1 directory2
The output is a list of the differences between the directory listings for directory1 and directory2, for example:
$ dircmp ./dir1 ./dir2 Jan 12 10:54 1995 dir1 only and dir2 only Page 1The top of the listing consists of those files which are unique to one or other of the directories; in this example, dir2 contains four files which are not present in dir1. The listing then contains a detailed comparison of every file which is named in both directories.
./t.appx.s ./t.prog.s ./t.scosh.s ./t.shell.s . . . Jan 12 10:54 1995 Comparison of dir1 dir2 Page 1
directory . same ./0.ct.s same ./00.partno.s same ./00.title.s . . .