Link to home
Start Free TrialLog in
Avatar of traveh
traveh

asked on

Recusrsively compare directories in Solaris 8

Hello Dear Experts!

I need to compare two directory trees in Solaris 8 (compare the directory trees, and the directory contents - text files and if possible, also binary files).

I was wondering if there is some GUI tool to do that (preferably freeware, or at least shareware).

If not - a good script will also be helpful...

Thanks,
Tal.
Avatar of wesly_chen
wesly_chen
Flag of United States of America image

Hi,

-------------
#!/bin/sh

find <path of directory 1> -exec ls -s --format=single-column {} \; > /tmp/dir1.txt
find <path of directory 2> -exec ls -s --format=single-column {} \; > /tmp/dir2.txt

diff /tmp/dir1.txt /tmp/dir2.txt > /tmp/diff.txt
------------------
This script will compare the size of each file and show the difference to /tmp/diff.txt

I use this script to compare our build tree of different branch source codes.
I'm not sure whether it fits your need or not.

Wesly
ASKER CERTIFIED SOLUTION
Avatar of yuzh
yuzh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of yuzh
yuzh

You can redirect the output to a file:
    dircmp dir1 dir2 > result.txt
Avatar of traveh

ASKER

Thanks!