Do you have two directory trees full of subdirectories and files?
Would you like to compare the filenames to see if there are some files only
in one tree or the other?
If you don't have
dircmp (16.22),
look at the quick-and-dirty substitute in the example below.
The
numbered prompts (7.2)
like 3%
are just for reference:
[..] | 1% |
---|
The comm (28.12) command will give you two columns: files in the left-hand column are only in directory1. Files in the right-hand column are only in directory2. You can get other information, too, like a list of files in both trees.
This works nicely for directory trees on other computers, too.
Run one find
|
sort
on the remote system.
Transfer
that file to the computer with the other directory tree
and run comm there.
Or do the diff across the network by replacing commands 3-5 above with:
rsh |
% |
---|
The -
argument tells comm to read its standard input (from
the remote find command).
Article
13.13
shows a similar trick for a filesystem across a network.
Articles
16.19
and
16.20
are about programs that help you see a directory tree.
-