dircmp - Questions
This is a discussion on dircmp - Questions ; Some Unix operating systems have the 'dircmp' command to compare
directories, but it seems that SUSE Linux 9.0 Pro (kernel 2.4) does
not. How can I download a binary of dircmp? Is there another command
with similar functionality?
What I ...
-
dircmp
Some Unix operating systems have the 'dircmp' command to compare
directories, but it seems that SUSE Linux 9.0 Pro (kernel 2.4) does
not. How can I download a binary of dircmp? Is there another command
with similar functionality?
What I want to do is
(1) list all the file names present in one directory but not another
(2) list file names found in two directories for which the file
contents are different.
-
Re: dircmp
beliavsky@aol.com wrote in message news:<3064b51d.0406061421.fe87941@posting.google.com>...
>
> (1) list all the file names present in one directory but not another
> (2) list file names found in two directories for which the file
> contents are different.
You could try rsync. It's meant for synchronising directories and
therefore needs to track differences and changes between those
directories. Used in "dry run" mode (-n) it would tell you what it
needed to copy, which would solve your problem.
Peter
-
Re: dircmp
In article <3064b51d.0406061421.fe87941@posting.google.com>,
wrote:
> Some Unix operating systems have the 'dircmp' command to compare
> directories, but it seems that SUSE Linux 9.0 Pro (kernel 2.4) does
> not. How can I download a binary of dircmp? Is there another command
> with similar functionality?
>
> What I want to do is
>
> (1) list all the file names present in one directory but not another
find dir1 -type f > file1
find dir2 -type f > file2
diff file1 file2
> (2) list file names found in two directories for which the file
> contents are different.
Some script involving find, "comm -12", and those two files you made in the
first part. Maybe "comm" won't recognize the lines if they're at different
offsets...
--
-eben ebQenW1@EtaRmpTabYayU.rIr.OcoPm home.tampabay.rr.com/hactar
AQUARIUS: There's travel in your future when your tongue freezes to the
back of a speeding bus. Fill the void in your pathetic life by playing
Whack-a-Mole 17 hours a day. -- Weird Al, _Your Horoscope for Today_
-
Re: dircmp
On 6 Jun 2004 15:21:09 -0700, wrote:
> Some Unix operating systems have the 'dircmp' command to compare
> directories, but it seems that SUSE Linux 9.0 Pro (kernel 2.4) does
> not. How can I download a binary of dircmp? Is there another command
> with similar functionality?
>
> What I want to do is
>
> (1) list all the file names present in one directory but not another
> (2) list file names found in two directories for which the file
> contents are different.
See gnu diff, it does pretty much the same as dircmp.
Not sure if there's an option to not show the diffs
between the different files or not though.
-
Re: dircmp
beliavsky@aol.com wrote:
> Some Unix operating systems have the 'dircmp' command to compare
> directories, but it seems that SUSE Linux 9.0 Pro (kernel 2.4) does
> not. [...]
It has the same functionality within "diff".
> (1) list all the file names present in one directory but not another
> (2) list file names found in two directories for which the file
> contents are different.
diff --brief dir1 dir2
Chris