LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 09-28-2009, 01:39 PM   #1
prasenjit.patra
LQ Newbie
 
Registered: Sep 2009
Posts: 2

Rep: Reputation: 0
how to compare two directories residing in two different servers


Hi,

I have one requirement like...I need to write a shell script which will compare two directories residing in two different servers (server A and server B) and list out the discrepancies if found any. Ideally the file names, counts, size should be same for the directory in two servers. So the script should find out the discrepancies if any. Could anyone please help me?

Thanks in advance and best regards,
Prasenjit
 
Old 09-28-2009, 02:59 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Use:
ls -l
ssh
diff
 
Old 09-28-2009, 09:20 PM   #3
edenCC
Member
 
Registered: May 2006
Location: China
Distribution: Debian
Posts: 198
Blog Entries: 1

Rep: Reputation: 32
I would create two file lists with md5sum fingerprint, then sort it, then compare the two files.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare files in two different servers elainelaw Linux - Software 2 07-16-2009 07:35 AM
Compare directory trees on seperate servers ? dhg1848 Linux - Server 4 11-26-2008 08:47 AM
How can I compare two folders to see if the directories are identical HGeneAnthony Linux - General 2 08-14-2008 05:55 AM
How to compare directories (inc. attributes)? jdupre Linux - Software 3 07-07-2005 01:16 AM
How do I compare md5sums of directories (and of course everything in it)? natalinasmpf General 1 12-08-2003 07:03 PM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 05:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration