TOOL » LINUX » PACKAGE

Diff

Syntax

shell
diff OPTIONS FROM_FILE TO_FILE
OptionDescription
-y --side-by-sideOutput in two columns.
-t --expand-tabsExpand tabs to spaces in output.
-u -U --unifiedOutput NUM (default 3) lines of unified context (git like).
-Z --ignore-trailing-spaceIgnore white space at line end.
--colorColorize the output; Can be never always auto.
--suppress-common-linesDo not output common lines.

Examples

See the difference similarly to git diff --no-index.

shell
diff -u --color=always FROM_FILE TO_FILE | less -R