On Unix-like operating systems, the dircmp command compares two directories, and reports differences in their contents.

Description

The dircmp command examines DIRECTORY1 and DIRECTORY2 and generates information about the contents of the directories. Listings of files that are unique to each directory are generated for all the options. If no option is entered, a list is output indicating whether the file names common to both directories have the same contents.

  • Description
  • Syntax
  • Options
  • Examples
  • Related commands
  • Linux commands help

Syntax

dircmp [-d] [-s] [-w n] DIRECTORY1 DIRECTORY2

Options

Examples

dircmp dir1 dir2

Compares the directory dir1 with the directory dir2. Below is an example of the output you may receive when running this command:

Feb 8 17:18 2001 Comparison of help issues Page 1 directory . same ./favicon.ico same ./logo.gif same ./question.gif

cmp — Compare two files byte by byte.diff — Identify the differences between two files.