Recusrsively compare directories in Solaris 8

Posted on 2004-11-23
Last Modified: 2013-12-21
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...

Question by:traveh
    LVL 38

    Expert Comment



    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.

    LVL 38

    Accepted Solution

    Why not just simply use "dircmp" command,

    dircmp dir1 dir2

    man dircmp
    to learn more details.

    A complicated way to do it:

    LVL 38

    Expert Comment

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

    Author Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Suggested Solutions

    I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
    Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now