GNU bug report logs - #23950
An enhancement request

Previous Next

Package: diffutils;

Reported by: "Dr. Randall Fisher" <randall.fisher <at> ieee.org>

Date: Mon, 11 Jul 2016 22:43:01 UTC

Severity: wishlist

Full log


Message #8 received at 23950 <at> debbugs.gnu.org (full text, mbox):

From: Dave Gordon <david.s.gordon <at> intel.com>
To: "Dr. Randall Fisher" <randall.fisher <at> ieee.org>, 23950 <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#23950: An enhancement request
Date: Wed, 13 Jul 2016 13:16:02 +0100
On 11/07/16 23:41, Dr. Randall Fisher wrote:
> Hi,
>
> I use "diff -r" when comparing a directory tree to a copy that I have made
> when the storage media is questionable.  There are often broken symlinks in
> the original (usually a backup from some defunct machine).  When I do the
> diff, I get thousands of messages along the lines of :
>
> diff: gecko-clone-100714/var/X11R6/lib/xkb/xkbcomp: No such file or
> directory
> diff: /home2/Backups/gecko-clone-100714/var/X11R6/lib/xkb/xkbcomp: No such
> file or directory
>
> There are also messages along the lines of:
>
> X/afifo is a fifo while Y/afifo is a fifo
> ... or a socket or a character special, etc.
>
> ​These aren't really useful in this context and bury any really important
> errors.​
>
> Could you add switches to :
>      1. Not dereference symlinks, but compare the symlink itself (i.e. no
> message if they point to the same non-existant place)?
>      2. Not report the "this is an orange while that is an orange" messages?
>
> ​Thank you,
> Randy Fisher​

Maybe diff(1) isn't the right tool? Have you considered using rsync(1) 
with the -vn options (verbose reporting, no actual transfers) to see 
what differs between the two trees? If you doubt the integrity of the 
storage medium, you might want to add "-C" (use checksums) as well, thus

$ rsync -aHvCn src/ dest/
sending incremental file list
./
bxt_dmc_ver1.bin -> bxt_dmc_ver1_07.bin

sent 510 bytes  received 22 bytes  1,064.00 bytes/sec
total size is 404,951  speedup is 761.19 (DRY RUN)

The output should list every directory checked (lines ending /) plus 
those nondirectory objects which differ between src and dest (lines not 
ending /) -- the latter are presumably what you're interested in.

HTH,
.Dave.




This bug report was last modified 8 years and 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.