For example, I want to compare and report differences between the
contents of the bin directory on production and on development Linux
servers.
Thanks
Mitali
If the files are supposed to be identical, then rsync in the
"non-action" mode will report what it would do to bring the 2 hosts into
synchronization. As in: (untested)
rsync -n -v -a host1:/usr/local/bin/ host2:/usr/local/bin
The inclusion of the "/" on the path ends is critical - see the rsync
man page for examples.
Boyd
If all you want to do is check for the presence or absence of each
file (you aren't concerned with checking that each file is identical,
just that they're present) then on the devel machine:
$ ls bin >development.ls
and on the production machine:
$ ls bin >production.ls
Get both files in the same place and run diff on them. If OTOH,
you only need to be alerted of programs on the development machine
that aren't on the production server then use:
$ comm -23 development.ls production.ls
--
Andrew Smallshaw
and...@sdf.lonestar.org