Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-25-2005, 10:21 PM
|
#1
|
Senior Member
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207
Rep:
|
How do I compare 2 files?
I'd like to compare 2 config files for 2 kernels to see what the differences are. These are 2 text files. How would I do this?
|
|
|
03-25-2005, 10:32 PM
|
#2
|
Senior Member
Registered: Jan 2002
Location: Southern California
Distribution: Slackware
Posts: 1,880
Rep:
|
Try this: http://sourceforge.net/projects/tkdiff/
It works very nicely, clearly pointing out the differences between two files.
|
|
|
03-25-2005, 10:34 PM
|
#3
|
Member
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561
Rep:
|
diff -au file1 file2
|
|
|
03-25-2005, 10:55 PM
|
#4
|
Member
Registered: Apr 2003
Distribution: Slackware 10.2 (AMD64 Desktop, HP ZV5120US & IBM T20 Laptops) Suse 10.1 (IBM T23 Laptop)
Posts: 58
Rep:
|
Kompare?
If you use KDE, you could also use the diff/patch frontend Kompare. It's under the K > Development menu
|
|
|
03-25-2005, 11:16 PM
|
#5
|
Senior Member
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207
Original Poster
Rep:
|
Thanks for all the advice on diff and tkdiff. From terminal I did this:
diff -au config-2.4.29 config-2.6.11 > config-diff
This gave me file config-diff that's a pretty big differences file (3587 lines). Are these lines matched up in similitude...are lines that are close in similarity to another compared?
|
|
|
03-26-2005, 12:59 AM
|
#6
|
Senior Member
Registered: Jan 2002
Location: Southern California
Distribution: Slackware
Posts: 1,880
Rep:
|
That's what I like about tkdiff. Both files are shown side by side in a split window with the differences highlighted in color. I used it exactly for the same purpose - to find out what differences existed between two kernel configs when I had a problem with a new kernel.
I usually favor a strict command line for most things, but in this case the GUI works.
|
|
|
03-26-2005, 01:54 AM
|
#7
|
LQ Newbie
Registered: Mar 2004
Distribution: gentoo/fedora
Posts: 1
Rep:
|
I like sdiff in a terminal window for this type of problem,
something like this:
sdiff -s config.a confgi.b
explain:
this suppresses the common lines of both files, and lets you see side by side the differences between the two.
man sdiff when in doubt..
HTH
badinode
|
|
|
All times are GMT -5. The time now is 12:40 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|