[X4U] Graphical folder comparison

Brian Lalor blalor at bravo5.org
Mon Sep 26 18:54:55 PDT 2005


On Sep 26, 2005, at 2:29 PM, Oliver Marshall wrote:

> Can anyone recommend a graphical folder comparison tool that will  
> show me what files are in one folder structure that arent in anotehr ?

Graphical, not that I know of, but I *can* do it via the shell.  Use  
find, sort and diff to list all of the files in each directory and  
then compare them.

For example, list the contents of each file to a different file:
     (cd /path/to/dir1 && find . -type f -print) | sort > listing1.txt
     (cd /path/to/dir2 && find . -type f -print) | sort > listing2.txt

Now, compare the two files, using diff:
     diff -ub listing1.txt listing2.txt

In the following example, 2.txt, 3.txt and 4.txt exist in both  
directories, but 1.txt is only in the first directory, and 5.txt is  
only in the second:
     --- listing1.txt        2005-09-26 20:52:28.000000000 -0500
     +++ listing2.txt        2005-09-26 20:52:30.000000000 -0500
     @@ -1,4 +1,4 @@
     -./1.txt
      ./2.txt
      ./3.txt
      ./4.txt
     +./5.txt

Look for lines that begin with a "-" for files that are in the first  
directory but not the 2nd, and lines with a "+" at the beginning for  
files that are in the 2nd but not the first.

This only compares the directories based on file *name*, not *content*.

> <winmail.dat>

Olly, Olly, Olly.  You're posting to a Mac list from a Windows  
machine?  *And* allowing it to attach winmail.dat?  How tacky. ;-)

-- 
     __   ____
    / /  / __/ Brian Lalor
   / _ \/__ \  blalor at bravo5.org
  /_.__/____/  http://bravo5.org/




More information about the X4U mailing list