GNU bug report logs -
#20250
diff by size
Previous Next
Reported by: Andreas <wiisses <at> web.de>
Date: Fri, 3 Apr 2015 14:56:02 UTC
Severity: normal
Tags: notabug
Done: Collin Funk <collin.funk1 <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20250 in the body.
You can then email your comments to 20250 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-diffutils <at> gnu.org:
bug#20250; Package
diffutils.
(Fri, 03 Apr 2015 14:56:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andreas <wiisses <at> web.de>:
New bug report received and forwarded. Copy sent to
bug-diffutils <at> gnu.org.
(Fri, 03 Apr 2015 14:56:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Dear diff-team,
this is not a bug but an idea for a diff option in further versions:
Idea:
comparison of two files by size only.
why?
makes comparison extremely fast; often no need to compare file contents
to get a first hint whether there is a difference at all
example:
- uploading a folder with a bunch of files to a slow motion cloud;
comparing each file by contents is very time consuming (...slow motion
cloud)
- as a first hint to find out about a possible difference could be the
comparison of file size for each file uploaded with the local ones
Thanks in advance for integrating this option in future diff versions.
Great tool, great diff team!
Andreas Schirra
wiisses <at> web.de
Information forwarded
to
bug-diffutils <at> gnu.org:
bug#20250; Package
diffutils.
(Tue, 07 Apr 2015 15:04:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 20250 <at> debbugs.gnu.org (full text, mbox):
On 03/04/15 14:20, Andreas wrote:
> Dear diff-team,
>
> this is not a bug but an idea for a diff option in further versions:
>
> Idea:
> comparison of two files by size only.
>
> why?
> makes comparison extremely fast; often no need to compare file contents
> to get a first hint whether there is a difference at all
>
> example:
> - uploading a folder with a bunch of files to a slow motion cloud;
> comparing each file by contents is very time consuming (...slow motion
> cloud)
> - as a first hint to find out about a possible difference could be the
> comparison of file size for each file uploaded with the local ones
>
> Thanks in advance for integrating this option in future diff versions.
>
> Great tool, great diff team!
> Andreas Schirra
> wiisses <at> web.de
It probably doesn't belong in diff(1), but maybe in cmp(1)? For example,
it might be a meaningful semantic for the case of "cmp -n 0", which
currently always says "equal" (-n 0 means compare at most 0 bytes), or
some other variation that isn't currently meaningful, such as "cmp -n -1
<FILE1> <FILE2>" ?
OTOH, you can easily get and compare filesizes in a script already,
for example using "stat --printf=%s <FILE>", and for the case of
synchronising with a slow remote backup, rsync(1) already incorporates
lots of clever ways to reduce the bandwidth of the remote traffic,
including using just the filesize and datestamp to check for (mis-)matches.
.Dave.
Information forwarded
to
bug-diffutils <at> gnu.org:
bug#20250; Package
diffutils.
(Mon, 09 May 2016 04:37:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 20250 <at> debbugs.gnu.org (full text, mbox):
tags 20250 notabug
close 20250
done
On Fri, Apr 3, 2015 at 6:20 AM, Andreas <wiisses <at> web.de> wrote:
> Dear diff-team,
>
> this is not a bug but an idea for a diff option in further versions:
>
> Idea:
> comparison of two files by size only.
>
> why?
> makes comparison extremely fast; often no need to compare file contents
> to get a first hint whether there is a difference at all
>
> example:
> - uploading a folder with a bunch of files to a slow motion cloud;
> comparing each file by contents is very time consuming (...slow motion
> cloud)
> - as a first hint to find out about a possible difference could be the
> comparison of file size for each file uploaded with the local ones
Thanks for the suggestion, but diff already performs the optimization,
when possible, of detecting when two files have different sizes,
and in that case does not even bother to open
(much less read/compare) them.
If you want to simply compare file sizes, you can already
write a tiny shell/perl/python script to obtain and compare
those numbers, so I'm closing this auto-created "issue".
You're welcome to continue the discussion, which is being
archived at http://bugs.gnu.org/20250
Information forwarded
to
bug-diffutils <at> gnu.org:
bug#20250; Package
diffutils.
(Mon, 09 May 2016 15:40:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 20250 <at> debbugs.gnu.org (full text, mbox):
On Sun, May 8, 2016 at 9:36 PM, Jim Meyering <jim <at> meyering.net> wrote:
> tags 20250 notabug
> close 20250
> done
>
> On Fri, Apr 3, 2015 at 6:20 AM, Andreas <wiisses <at> web.de> wrote:
>> Dear diff-team,
>>
>> this is not a bug but an idea for a diff option in further versions:
>>
>> Idea:
>> comparison of two files by size only.
>>
>> why?
>> makes comparison extremely fast; often no need to compare file contents
>> to get a first hint whether there is a difference at all
>>
>> example:
>> - uploading a folder with a bunch of files to a slow motion cloud;
>> comparing each file by contents is very time consuming (...slow motion
>> cloud)
>> - as a first hint to find out about a possible difference could be the
>> comparison of file size for each file uploaded with the local ones
>
> Thanks for the suggestion, but diff already performs the optimization,
> when possible, of detecting when two files have different sizes,
> and in that case does not even bother to open
> (much less read/compare) them.
To clarify: the above is what happens when you use the --brief (-q) option.
It is obviously not the default.
Added tag(s) notabug.
Request was from
Collin Funk <collin.funk1 <at> gmail.com>
to
control <at> debbugs.gnu.org.
(Sat, 02 Aug 2025 06:34:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
20250 <at> debbugs.gnu.org and Andreas <wiisses <at> web.de>
Request was from
Collin Funk <collin.funk1 <at> gmail.com>
to
control <at> debbugs.gnu.org.
(Sat, 02 Aug 2025 06:34:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org.
(Sat, 30 Aug 2025 11:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 78 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.