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
look at the quick-and-dirty substitute in the example below.
numbered prompts (7.2
are just for reference:
find . -type f -print | sort >/tmp/dir1
find . -type f -print | sort >/tmp/dir2
comm -3 /tmp/dir
6% rm /tmp/dir
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
This works nicely for directory trees on other computers, too.
on the remote system.
that file to the computer with the other directory tree
and run comm
Or do the diff
across the network by replacing commands 3-5 above with:
; find . -type f -print | sort' | \
comm -e /tmp/dir1 -
argument tells comm
to read its standard input (from
the remote find
shows a similar trick for a filesystem across a network.
are about programs that help you see a directory tree.