dircmp - directory comparison (LEGACY)
dircmp [-ds] dir1 dir2
The dircmp utility examines the directory hierarchies specified by dir1 and dir2 and generates various tabulated information about the contents of the directories. Sorted listings of files that are unique to each directory are generated for all the options. If no option is specified, a list is output that indicates whether the filenames common to both directories have the same contents.
The dircmp utility supports the XBD specification, Utility Syntax Guidelines . The following options are supported:
- Compare the contents of files with the same name in both directories and output a list indicating what must be changed in the two files to bring them into agreement. The list format is described in diff.
- Suppress messages about identical files.
The following operands are supported:
- A pathname of a directory to be compared.
The following environment variables may affect the execution of dircmp:
- Provide a default value for the internationalisation variables that are unset or null. If LANG is unset or null, the corresponding value from the implementation-dependent default locale will be used. If any of the internationalisation variables contains an invalid setting, the utility will behave as if none of the variables had been defined.
- If set to a non-empty string value, override the values of all the other internationalisation variables.
- Determine the locale for the ordering of the output.
- Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments and input files).
- Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.
- Determine the location of message catalogues for the processing of LC_MESSAGES .
The output format of dircmp is unspecified, but includes:
- lists of pathnames in either dir1 or dir2, but not both
- when -d is given, listings of differences between files, as produced by diff.
Used only for diagnostic messages.
The following exit values are returned:
- Successful completion.
- An error occurred. (Differences in directory contents are not considered errors.)
Applications should migrate to the diff -r command.