Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Recusrsively compare directories in Solaris 8

Posted on 2004-11-23
4
Medium Priority
?
565 Views
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...

Thanks,
Tal.
0
Comment
Question by:traveh
  • 2
4 Comments
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12662397
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
0
 
LVL 38

Accepted Solution

by:
yuzh earned 2000 total points
ID: 12662507
Why not just simply use "dircmp" command,
eg:

dircmp dir1 dir2

man dircmp
to learn more details.

A complicated way to do it:
http:Q_21130862.html

0
 
LVL 38

Expert Comment

by:yuzh
ID: 12662522
You can redirect the output to a file:
    dircmp dir1 dir2 > result.txt
0
 

Author Comment

by:traveh
ID: 12680983
Thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
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.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

578 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