<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<blockquote cite="mid46DCF95A.8060407@bluewin.ch" type="cite">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
  <small>I have this box equipped with a single 40GB harddrive shared
by
Win98SE / SuSE9.2 / Kubuntu 7.04.<br>
There are two partitions that harbor respectively Kubuntu (hda3 - ext3
- 11GB) and SuSE9.2 (hda5 - ext3 - 13GB).<br>
While the contents of these two partitions differ considerably from one
another, hda5 still contains several hundred text files (some Word
docs, some OO odt's) that are identical with files on hda3.<br>
I'm going to continue working with Kubuntu (my favorite distro) but
must clear the SuSE partition to make room for other stuff. <br>
The idea</small><small> is to delete any duplicate text/doc versions
from hda5 (SuSE</small><small>) and move all the non-duplicate ones to
hda3 (Kubuntu) before I reformat hda5.</small><br>
  <small>For good measure I've backed up the /home folders of both
distros and some other items like e.g. Thunderbird profiles.<br>
My question: is there a good way of determining which text/doc files
are identical across the two distros (by filename and modification
date, or by content), short of doing it manually?<br>
  </small></blockquote>
There are some nice tools to get the work done:<br>
<br>
cmp - compare two files byte by byte on the command line<br>
<br>
diff - compare files line by line on the command line<br>
<br>
Please see "man cmp" and "man diff" for the full feature set.<br>
<br>
These are the old school Unix tools every Unix/Linux system should have.<br>
<br>
With diff you can compare hole directories:<br>
<br>
diff <PATH_TO_DIRECOTRY_ONE> <PATH_TO_DIRECOTRY_TWO><br>
<br>
With compare you have to provide every file by hand. Or make use of a
loop (for, while, etc.) on the command line or write a shell script.<br>
<br>
If you like GUIs more: last week I stumpled over a KDE programm called
"komparator":<br>
<br>
"Komparator is a KDE application that allows the user to search two
directories and synchronize them interactively. Unlike other (command
line) tools the user has intuitive control over what is done."<br>
<br>
I tested it once and it seems to work. Install it with "sudo apt-get
install komparator".<br>
<br>
Also there are two other tools specializing in directory and file
synchronisation:<br>
<br>
rsync - command line only. Install it with "sudo apt-get install rsync"<br>
<br>
unison - command line and GUI programm. Install it with "sudo apt-get
install unison" for the command line and "sudo apt-get install
unison-gtk" for the GUI version.<br>
<br>
ATTENTION: please read the manual pages before using rsync or unison
and make backup copies of the directories for the first use. If you do
something wrong you might delete your files!<br>
<br>
For your problem I would use unison.<br>
<br>
Greetings,<br>
<br>
Michael<br>
<br>
P.S.: the manual page for unision is build in. Type "unison -doc
topics" on a command line to get the topics and "unison -doc tutorial |
less" for the tutorial.<br>
<br>
</body>
</html>