Operating System - HP-UX
1748239 Members
3653 Online
108759 Solutions
New Discussion

Re: How to compare files between 2 directories?

 
SOLVED
Go to solution
Yaroki
Super Advisor

How to compare files between 2 directories?

Hello,

 

I'm using HP-UX B.11.11 and I would like to compare the content of 2 different directories, each one on a different machine. The purpuse is to see that both identicals.

 

I know that rsync can do something like that but I don't have and I don't know how to install it.

 

Is there any other option/tool for me?

Alternately, I will be happy to learn how to install it.

 

BR,

Yali.

 

5 REPLIES 5
taylor06
Occasional Advisor

Re: How to compare files between 2 directories?

Hello all,

 

The command "dircmp" might help.......pls check and let me know.........

Yaroki
Super Advisor

Re: How to compare files between 2 directories?

Hi,

 

The dircmp command compares between directories - yes it fine, but I looking for comparison between 2 directories and their files.

I would like to know whether 2 files with the same names on different directories are exist and if their content is identify.

 

 

Dennis Handly
Acclaimed Contributor

Re: How to compare files between 2 directories?

If you can access the other directory through NFS, you can just use diff on the two directories.

 

If not, you can use "cksum *" on the two directories and then compare the two outputs.

Yaroki
Super Advisor

Re: How to compare files between 2 directories?

Hello,

 

I am using HP-UX b.11.11.

I would like to use rsync command for that version.

 

Can you please instruct me on how to download and install the command?

 

Best Regards,

 

Yali

Bill Hassell
Honored Contributor
Solution

Re: How to compare files between 2 directories?

rsync for 11.11 was available from HP several years ago but all of the open source programs (called Interneet Express) have been withdrawn. The easiest location to get the program is from the Porting Center:

 

http://hpux.connect.org.uk/

 

or for rsync:

 

http://hpux.connect.org.uk/hppd/hpux/Networking/Admin/rsync-3.0.9/

 

NOTE: rsync is the best choice to quickly synchronize directories, that is, to make sure that the destination matches the source. If you just want to know if they are the same, use the -n or --dry-run option.



Bill Hassell, sysadmin