HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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