The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
comparing the content of two directories xyzt UNIX for Dummies Questions & Answers 2 04-29-2008 11:36 AM
Comparing directories via ftp tekster757 UNIX for Dummies Questions & Answers 1 03-21-2008 07:48 AM
comparing 2 Solaris servers melanie_pfefer SUN Solaris 9 03-11-2008 01:29 PM
moving directories to new directories on multiple servers mackdaddy07 Shell Programming and Scripting 0 04-06-2007 12:30 PM
compare directories on two servers MizzGail Shell Programming and Scripting 1 03-25-2003 01:41 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 10-29-2009
Jazmania Jazmania is offline
Registered User
  
 

Join Date: Feb 2007
Location: Ireland
Posts: 43
Comparing directories on different unix servers

Is it possible to use the diff command to compare two directories on different Unix (AIX) servers?

We have two regions set up and we want to be able to compare if the scripts directory in both regions contain the same files?

I want to figure out if its possible.. Have been messing around by dumping the listing of each dir into separate files and comparing them with diff.. But that doesn't work the way i need it to..

Is there any other command out there that could work?

Thanks,
Jaz

EDIT**

Can something like this work?? I've tried it from the command line but it gives the following error.

ksh: syntax error: `(' unexpected



Code:
diff <(ssh server_name 'cd directory_to_compare; find . -type f -exec {} \;| sort -k 2') <(ssh servername2 'cd directory_to_compare; find . -type f -exec {} \;| sort -k 2') >> diff_report.txt


Last edited by Jazmania; 10-29-2009 at 09:56 PM..
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:00 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0