You have an original directory.
You copy the files in it to another directory, edit some of them, and
add a few others.
Later, you want to know the differences between the two directories.
If your system's
has a -r
(recursive) option, you can
System V has dircmp
The output of dircmp
is formatted with
66-line-long pages with headings:
dircmp a b
Sep 16 09:26 1991 a only and b only Page 1
Sep 16 09:26 1991 Comparison of a b Page 1
a only and b only
listing, files only in the first directory
are in the first column and files only in the second directory are in the
Comparison of a b
listing compares files that are in both
The comparison is recursive - if there are any subdirectories,
checks those, too.
The dircmp -s
option stops the "identical file" messages.
to run diff
on files that are different;
prints a new page for each diff
dircmp -d -s a b
Sep 16 09:35 1991 a only and b only Page 1
Sep 16 09:35 1991 Comparison of a b Page 1
Sep 16 09:35 1991 diff of ./pqp.help in a and b Page 1
< -# "Only this printer"... 'pqp -3' would print on #3.
> -# "Only this printer"... 'pqp -3' would print only on #3;
> other printer queues will be held.
The designers assumed you'd want to send the output to a printer.
I usually read it on my screen with the
pager and its -s
option, which squeezes out the multiple
If you don't have less
or more -s
, try piping the output