About
Text File Content diff in Linux
Articles Related
Files
File 1
Same Line
Same Line 2
Different Line
File 2
Same Line
New Line
Same Line 2
Different Line :)
Diff
Unified
diff file1.txt file2.txt
1a2
> New Line
3c4
< Different Line
---
> Different Line :)
Diff command point to which lines need to be:
- Added (a)
- Deleted (d)
- Changed (c)
Symbol:
- less than (<) symbol: Line must be suppressed ?
- greater than (>) symbol: New Line
Side by Side
Sdiff runs diff with the side-by-side options.
sdiff file1.txt file2.txt
Same Line Same Line
> New Line
Same Line 2 Same Line 2
Different Line | Different Line :)