Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 2

Linux dircmp command

Updated: 04/26/2017 by Computer Hope

• About dircmp
• dircmp syntax
• dircmp examples
• Related commands
• Linux and Unix commands help

About dircmp
Compare two directories.

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.

dircmp syntax
dircmp [-d] [-s] [-w n] DIRECTORY1 DIRECTORY2
Options
Compare the contents of files with the same name in both DIRECTORY1 and DIRECTORY2
-d output a list telling what must be changed in the two files to bring them into agreement. The list
format is described in diff.
-s Does not tell you about the files that are the same.
-w n Change the width of the output line to n characters. The default width is 72.

dircmp 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

You might also like