Operating System - HP-UX
1752815 Members
5868 Online
108789 Solutions
New Discussion юеВ

Remote comparison of files/folders on UNIX

 
Danny Fang
Frequent Advisor

Remote comparison of files/folders on UNIX

HI,

I need to compare files and folders that are located in 2 remote machines.

I did some search and found that rsync and rdist are good in performing differential copies. But all I need now is to simply do a remote comparison of files between 2 remote machines.

Could anyone suggest any methods or share any scripts on performing such a task?

Thanks in advance!
Danny
2 REPLIES 2
Steven Schweda
Honored Contributor

Re: Remote comparison of files/folders on UNIX

Many things are possible, depending on what
sort of network access is possible between
these systems, and exactly what you'd like to
compare.

Given NFS, "diff" should work.

For a slow network connection and large
files, it might pay to collect some kind of
checksum for relevant files on each system,
and then compare those.

A little looking around should find some old
Forum threads with similar requests (some of
which were almost as vague as this one, at
least at the beginning).
Laurent Menase
Honored Contributor

Re: Remote comparison of files/folders on UNIX

you can do a
cd thedirectory
find . -type f | xargs cksum >filesh1.cksum
same on the second system with filesh2.cksum

then do a diff filesh?.cksum