How to Compare Files Using diff Command in Linux

The “diff command” compares two files, returns the line(s) that are different, and tells you how to make the files the same.

Here’s an example to use ‘diff’ command

$ diff file1 file2

Here, File1 and File 2 are two files taken for comparison. The UNIX assigns for file 1 ‘A’ and for File 2 ‘B’. Then it gives clear differences.

Refer more for diff commands

Recent Posts

Discover more from Srinimf

Subscribe now to keep reading and get access to the full archive.

Continue reading