Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
My question is, there is one configuration file which had written some day before. Now i have modified that file by adding some more lines of code. Now my task is to compare and check where all i modified that file. Is there any method in linux to compare those files. Can any one help me out.
Regards,
Shahid Nx
Click here to see the post LQ members have rated as the most helpful post in this thread.
But the out put that diff cmd is giving i m not getting that.
is it possible in linux where it compares the two files and display only lines that are not present in old file. means if old file is of 100 lines and in new file i added 10 more lines to it. So is there any way to display only these added lines. Plz share if any idea
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900
Rep:
Install Meld, open the application tell it what files you want to compare and it will show you what lines are different. I use it alot for optimising package lists.
man -k compare| egrep '\(1|8\)'
bzcmp [] (1) - compare bzip2 compressed files
bzdiff [] (1) - compare bzip2 compressed files
cmp [] (1) - compare two files byte by byte
comm [] (1) - compare two sorted files line by line
compare [] (1) - mathematically and visually annotate the difference between an image and its reconstruction
diff [] (1) - compare files line by line
diff3 [] (1) - compare three files line by line
git [] (1) - diff-files - Compares files in the working tree and the index
git [] (1) - diff-index - Compares content and mode of blobs between the index and repository
git [] (1) - diff-tree - Compares the content and mode of blobs found via two tree objects
infocmp [] (1) - compare or print out terminfo descriptions
ldapcompare [] (1) - LDAP compare tool
lzcmp [] (1) - compare LZMA compressed files
lzdiff [] (1) - compare LZMA compressed files
msgcmp [] (1) - compare message catalog and template
ndiff [] (1) - Utility to compare the results of Nmap scans
ntfscmp [] (8) - compare two NTFS filesystems and tell the differences
rcsdiff [] (1) - compare RCS revisions
test [] (1) - check file types and compare values
tiffcmp [] (1) - compare two TIFF files
zcmp [] (1) - compare compressed files
zdiff [] (1) - compare compressed files
zipcmp [] (1) - compare contents of zip archives
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.