In the output of the diff command, each line represents the following:
-
Change Indicator: The first part of the output, such as
1c1, indicates the type of change:- The first number (before the letter) refers to the line number in the first file.
- The letter (
c,d, ora) indicates the type of change:c: changed: deletea: add
- The second number (after the letter) refers to the line number in the second file.
-
Content from the First File: The line prefixed with
<shows the content from the first file that is being compared. -
Separator: The three dashes
---separate the content from the two files. -
Content from the Second File: The line prefixed with
>shows the content from the second file that differs from the first file.
For example, in the output:
1c1
< The quick brown fox jumps over the lazy dog
---
> The quick brown lynx jumps over the lazy dog
1c1indicates that line 1 in the first file needs to be changed to match line 1 in the second file.- The line starting with
<shows the original content from the first file. - The line starting with
>shows the new content from the second file.
