Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)

dircmp(1) OSS Shell and Utilities Reference Manual
NAME
dircmp - Compares two directories
SYNOPSIS
dircmp [-d][-s] directory1 directory2
FLAGS
-d Displays, for each common lename, the differing contents of the two les, if any. The
display format is the same as that of the diff command.
-s Suppresses listing of the names of identical les.
DESCRIPTION
The dircmp command reads directory1 and directory2, compares their contents, and writes the
results to the standard output le.
First, dircmp compares the lenames in each directory. When the same lename appears in
both, dircmp compares the contents of the two les.
In the output, dircmp lists the les unique to each directory. It then lists the les with identical
names but different contents. If entered without a ag, dircmp also lists les that have both
identical names and identical contents.
Environment Variables
This command supports the use of the LANG, LC_ALL, LC_COLLATE, LC_CTYPE,
LC_MESSAGES, and NLSPATH environment variables.
EXAMPLES
1. To summarize the differences between the les in two directories, enter:
dircmp proj.ver1 proj.ver2
This command displays a summary of the differences between the directories proj.ver1
and proj.ver2. The summary lists separately the les found only in one directory or the
other, and those found in both. If a le is found in both directories, that le is listed. If
the les are identical, dircmp displays identical; otherwise, dircmp displays dif-
ferent.
2. To show the details of the differences between les, enter:
dircmp -d -s proj.ver1 proj.ver2
The -s ag suppresses information about identical les. The -d ag displays a diff listing
for each of the differing les found in both directories.
NOTES
In most cases, diff -r, rather than dircmp, is preferred.
EXIT VALUES
The following exit values are returned:
0 (zero) The command completed successfully.
>0 An error occurred.
RELATED INFORMATION
Commands: cmp(1), diff(1).
314 Hewlett-Packard Company 527188-004