![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| To compare selective file in different folders | gmahesh2k | UNIX for Dummies Questions & Answers | 0 | 05-14-2008 11:03 PM |
| how to sync remote folders without overwriting | prvnrk | UNIX for Advanced & Expert Users | 2 | 02-15-2008 09:53 PM |
| sync remote folders | prvnrk | Shell Programming and Scripting | 0 | 02-15-2008 01:58 PM |
| SFTP:error while creating folders on remote server | vgs | Shell Programming and Scripting | 0 | 08-01-2007 01:01 PM |
| Backing up Folders without some folders...;) | chimpu | Shell Programming and Scripting | 1 | 04-26-2004 07:02 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Remote compare of folders
Hi,
Is there a way (either commands/tools/scripts/logic) to compare two given folders on different unix boxes. I want to compare folder a in Unix box 'A' with folder 'b' in Unix box 'B'. I can run the script in Unix box 'A'. I am looking. for following results: files/sub folders only in a files/sub folders only in b compare the file sizes of files which are present in both and display those files where there is a difference. Thanks, Sunil |
| Forum Sponsor | ||
|
|
|
|||
|
Rdist
I guess the standard Rdist utility could solve the problem,
Below is the same script that we can be used to identify the files/directories on in sync between the two machines, #Create a Distfile on the Localhost cat Distfile #Distfile1 /tmp/A -> remote_host install /tmp/A; Assuming on the Local machine,we have under /tmp ./A ./A/B ./A/B/C ./A/B/C/D ./A/B/C/D/d ./A/B/C/D/d1 ./A/B/C/c ./A/B/C/c1 ./A/B/C/c2 ./A/a #On the local machine run, rdist -vf Distfile If on the remote machine only /tmp/A exists then, Output: updating host remotehost need to install: /tmp/A/B need to install: /tmp/A/a You may require the ~/.rhosts file to be setup on the remote host( in case of rsh protocol ).Please search for rdist in the forum. Thanks, Nagarajan Ganesan. |
|||
| Google UNIX.COM |