Author Topic: please advise linux differnce program to compare old vs up graded files  (Read 6409 times)

0 Members and 2 Guests are viewing this topic.

Offline Wilson__Topic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: gb
please advise linux software for use to compare older version vs newer version of library software.   Just need basic compare.  Nothing special.

a) cli
b) with graphical user interface

AI says diff and mold.  Are they good?
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 2445
  • Country: pl
Re: please advise linux differnce program to compare old vs up graded files
« Reply #1 on: February 26, 2025, 04:52:56 pm »
Diff is the standard. With vimdiff offering a nice TUI, if you’re accustomed to vim.
Why 📎 | We live in times when half of people have IQ below 100.
 
The following users thanked this post: Wilson__

Offline abeyer

  • Frequent Contributor
  • **
  • Posts: 940
  • Country: us
Re: please advise linux differnce program to compare old vs up graded files
« Reply #2 on: February 26, 2025, 05:58:37 pm »
Other nice gui options are kdiff3 (oss) and Beyond Compare (paid commercial license.) In GUI-land I tend to alternate between those and meld based on the use case. They tend to have largely overlapping functionality, but I think each has its own strengths.

In the CLI space, some other options worth thinking about are: Using git-diff directly (you can use it as a standalone tool without a git repo with the --no-index option) specifically for its patience and histogram algorithms, which give far more readable diffs for many common types of code movement. diffoscope provides lots of support for recursively descending into various types of archive and container files, and can work alongside binwalk to compare disk and firmware images. difftastic is nice if you're using working with programming language files that have a treesitter grammar, as it will actually parse and understand the code at a structural level, and produce a more "syntactic" diff that reflects the structure of the language, rather than just a textual one.
 
The following users thanked this post: Wilson__

Offline madires

  • Super Contributor
  • ***
  • Posts: 9181
  • Country: de
  • A qualified hobbyist ;)
Re: please advise linux differnce program to compare old vs up graded files
« Reply #3 on: February 26, 2025, 06:06:26 pm »
With GUI: Meld
 
The following users thanked this post: mwb1100, Wilson__

Offline tunk

  • Super Contributor
  • ***
  • Posts: 1409
  • Country: no
Re: please advise linux differnce program to compare old vs up graded files
« Reply #4 on: February 26, 2025, 06:23:39 pm »
You could also use the package manager of your distro
to see which versions they are, and then look at the
package source code. Or is this from some commercial
software?
 
The following users thanked this post: Wilson__

Offline Wilson__Topic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: gb
Re: please advise linux differnce program to compare old vs up graded files
« Reply #5 on: February 26, 2025, 06:59:30 pm »
Many thanks for advises.  I have two folders containing lib files.  One folder was downloaded time ago.  The other folder is latest. 

Tried a few and IMHO text base simple tools is easiest
 

Offline eutectique

  • Frequent Contributor
  • **
  • Posts: 632
  • Country: be
Re: please advise linux differnce program to compare old vs up graded files
« Reply #6 on: February 26, 2025, 07:00:14 pm »
please advise linux software for use to compare older version vs newer version of library software.

What do you want to compare exactly? Two zip archives? Two .tgz archives? Two system logs? Two git repositories? Two shared library files -- binaries or disassembly?

Each use case would have a tool best suited for the task.

Just need basic compare.  Nothing special.

"Basic compare, nothing special" would be diff. But you might not be satisfied with the result.
 
The following users thanked this post: Wilson__

Offline eutectique

  • Frequent Contributor
  • **
  • Posts: 632
  • Country: be
Re: please advise linux differnce program to compare old vs up graded files
« Reply #7 on: February 26, 2025, 07:07:39 pm »
I have two folders containing lib files.

meld is good showing directories. Are you lib files text of binary? If the former, meld would show you the differences. If the latter, you will only see "binary files are different". They could have the same .text sections (I am speculating, you did not tell the details) but different time stamps. So, having the same code, they will technically be different.
 
The following users thanked this post: Wilson__

Offline Wilson__Topic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: gb
Re: please advise linux differnce program to compare old vs up graded files
« Reply #8 on: February 26, 2025, 07:25:58 pm »
Many thanks for advises.  I have an older and newer folders. For two versions of a source code lib.  All plain text source files.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 23122
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: please advise linux differnce program to compare old vs up graded files
« Reply #9 on: February 26, 2025, 08:26:46 pm »
Meld, for manual inspection of differences
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: Wilson__

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 5734
  • Country: Earth
Re: please advise linux differnce program to compare old vs up graded files
« Reply #10 on: February 26, 2025, 10:27:10 pm »
git for version tracking, meld for text file comparison

when the folder is under git control, you can just type ```git status``` to get modified file list, or start meld with current folder as argument, it know how to obtain file status from git.
« Last Edit: February 26, 2025, 10:30:03 pm by radiolistener »
 
The following users thanked this post: Wilson__

Offline Wilson__Topic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: gb
Re: please advise linux differnce program to compare old vs up graded files
« Reply #11 on: February 26, 2025, 10:48:39 pm »
when the folder is under git control, you can just type ```git status``` to get modified file list, or start meld with current folder as argument, it know how to obtain file status from git.
Is that for git running on my local linux machine and not github?  I just trying to setup and not used git nor github (apart from downloading) before
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 5734
  • Country: Earth
Re: please advise linux differnce program to compare old vs up graded files
« Reply #12 on: February 27, 2025, 12:20:18 am »
Is that for git running on my local linux machine and not github?  I just trying to setup and not used git nor github (apart from downloading) before

git just allows you to track your local file changes, so you can see all commit history for the file, you can compare two different commits, you can revert back to any version, then restore latest version, etc. Then when you need you can push all your local commits to a server repository and obtain all server commits to your local git. But you can do tracking without pushing to the server, just locally.

If you want just to compare two text files, then simply type meld <file1> <file2>
Meld also support folder comparison, so you can pass two folders as argument.
It also allows to compare 3 files, just pass 3 files as command line argument.

« Last Edit: February 27, 2025, 12:23:52 am by radiolistener »
 
The following users thanked this post: Wilson__

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17786
  • Country: fr
Re: please advise linux differnce program to compare old vs up graded files
« Reply #13 on: February 27, 2025, 05:32:39 am »
I also use Meld as a GUI diff. Note that it's also available on Windows, if you use that: https://meldmerge.org/
On Windows, I used to use WinMerge otherwise: https://winmerge.org/
 
The following users thanked this post: Smokey, Wilson__

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3912
  • Country: it
Re: please advise linux differnce program to compare old vs up graded files
« Reply #14 on: February 27, 2025, 10:13:16 am »
On windows i use WinMerge

Love it!
Compare 2/3 files, or 2/3 folders, can recognize automatically if there is an archive (zip, rar, xlsx, ...) and operate on the archive data, or directly the binary
I use it for everything that is not already tracked into GIT, or for example two different text files.
Win2000 aesthetics so everything is direct and to the point.

I wonder if there is something simillar in linux
 
The following users thanked this post: Wilson__

Online DiTBho

  • Super Contributor
  • ***
  • Posts: 5098
  • Country: gb
Re: please advise linux differnce program to compare old vs up graded files
« Reply #15 on: February 27, 2025, 03:50:28 pm »
dev-util/difftastic is written in rust  :o :o :o
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 
The following users thanked this post: Wilson__

Offline abeyer

  • Frequent Contributor
  • **
  • Posts: 940
  • Country: us
Re: please advise linux differnce program to compare old vs up graded files
« Reply #16 on: February 27, 2025, 04:33:23 pm »
On windows i use WinMerge
...
I wonder if there is something simillar in linux

Have you looked at Beyond Compare? Fairly similar ui and feature set, and cross platform implementation for win, mac, and linux. It's not free, but well worth the modest cost, imho.
 
The following users thanked this post: Wilson__

Offline abeyer

  • Frequent Contributor
  • **
  • Posts: 940
  • Country: us
Re: please advise linux differnce program to compare old vs up graded files
« Reply #17 on: February 27, 2025, 04:34:19 pm »
dev-util/difftastic is written in rust  :o :o :o

I'm not the "rewrite it in rust!" crowd, but given that this was a new build and the nature of what it does, seems like not a bad choice.
 
The following users thanked this post: Wilson__

Online DiTBho

  • Super Contributor
  • ***
  • Posts: 5098
  • Country: gb
Re: please advise linux differnce program to compare old vs up graded files
« Reply #18 on: February 27, 2025, 05:42:16 pm »
dev-util/difftastic is written in rust  :o :o :o

I'm not the "rewrite it in rust!" crowd, but given that this was a new build and the nature of what it does, seems like not a bad choice.

It's a problem for me because I can't compile it on { HPPA, MIPS, MIPS64, ARM-v5(1), .. } due to lack of Rust compiler.
(1) Zaurus GNU/Linux
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 
The following users thanked this post: Wilson__

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17786
  • Country: fr
Re: please advise linux differnce program to compare old vs up graded files
« Reply #19 on: February 27, 2025, 05:50:23 pm »
Judging from what they say on their project page, you may not be missing much. It looks pumped-full of bugs.
 
The following users thanked this post: Wilson__

Offline abeyer

  • Frequent Contributor
  • **
  • Posts: 940
  • Country: us
Re: please advise linux differnce program to compare old vs up graded files
« Reply #20 on: February 27, 2025, 06:30:26 pm »
Judging from what they say on their project page, you may not be missing much. It looks pumped-full of bugs.

I've used it off and on for tasks it's a good match for, and has worked well in my experience. It's clearly not (nor intended to be) a full replacement for a general textual diff, though.
 
The following users thanked this post: Wilson__

Offline abeyer

  • Frequent Contributor
  • **
  • Posts: 940
  • Country: us
Re: please advise linux differnce program to compare old vs up graded files
« Reply #21 on: February 27, 2025, 06:55:15 pm »
It's a problem for me because I can't compile it on { HPPA, MIPS, MIPS64, ARM-v5(1), .. } due to lack of Rust compiler.

suppose it probably doesn't work on a UNIVAC either, huh? ¯\_(ツ)_/¯

Not to be too snarky, I'll just say I get the interest (and share it) in playing with less common/older/oddball architectures... but complaining that everyone who writes new software and gives it away for free doesn't support your particular collection of boat anchors doesn't really seem productive. (and if we're gonna complain,  sparc should be higher than any of those on the list  :box:)

Also, mips, mipsel, and mips64 all have at least tier 3 support in rust now... not necessarily easy to work with, but they're there.

 
The following users thanked this post: langwadt, Wilson__

Online DiTBho

  • Super Contributor
  • ***
  • Posts: 5098
  • Country: gb
Re: please advise linux differnce program to compare old vs up graded files
« Reply #22 on: February 27, 2025, 08:14:13 pm »
suppose it probably doesn't work on a UNIVAC either, huh? ¯\_(ツ)_/¯

Not to be too snarky, I'll just say I get the interest (and share it) in playing with less common/older/oddball architectures... but complaining that everyone who writes new software and gives it away for free doesn't support your particular collection of boat anchors doesn't really seem productive. (and if we're gonna complain,  sparc should be higher than any of those on the list  :box:)

I certainly don't feel like complaining, but if I really have to, it's for posts like yours, which distort what I write.

I don't think your post was "sarcastic", but why do you have to put words in my mouth that I didn't write?
I just wrote that it's written in rust, it's a fact.
You asked me why this is relevant, and i said it's relevant to me, because I can't emerge it on the systems i support.

Also, mips, mipsel, and mips64 all have at least tier 3 support in rust now... not necessarily easy to work with, but they're there.

Talking about my experiments on Catalyst, Rust is rather experimental, not enough stable for an Overlay.


« Last Edit: February 27, 2025, 08:22:43 pm by DiTBho »
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 
The following users thanked this post: JPortici, Wilson__

Online DiTBho

  • Super Contributor
  • ***
  • Posts: 5098
  • Country: gb
Re: please advise linux differnce program to compare old vs up graded files
« Reply #23 on: February 27, 2025, 08:21:17 pm »
Judging from what they say on their project page, you may not be missing much. It looks pumped-full of bugs.

Yup. Same impression ...  :-//

I will try it on my MacMini-2009/x86.
I'm curious because I also wrote a tool like this.
It only supports myC, I already talked about it in a similar topic to this one, just about tools for differences.
I reused part of the myC compiler code, the lexer, and the parser, for kind of "smarter" analysis between two source files.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 
The following users thanked this post: Wilson__

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17786
  • Country: fr
Re: please advise linux differnce program to compare old vs up graded files
« Reply #24 on: February 28, 2025, 07:14:45 am »
Judging from what they say on their project page, you may not be missing much. It looks pumped-full of bugs.

Yup. Same impression ...  :-//

I will try it on my MacMini-2009/x86.
I'm curious because I also wrote a tool like this.
It only supports myC, I already talked about it in a similar topic to this one, just about tools for differences.
I reused part of the myC compiler code, the lexer, and the parser, for kind of "smarter" analysis between two source files.

Yes, I remember that. This is an interesting approach, although not a replacement for a classic diff IMO, but complementary. Indeed, it would consider two pieces of code identical if they have the same AST (if I get it right), but you may have refactored code in a way that produces the exact same AST (but refactored maybe for readability reasons or otherwise) and the tool would miss that?
 
The following users thanked this post: Wilson__


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf