diff <file...>

Compare files line by line

Arguments

NameDescription
filefilepaths

Options

NameDescription
-i, --ignore-caseIgnore case differences in file contents
--ignore-file-name-caseIgnore case when comparing file names
--no-ignore-file-name-caseConsider case when comparing file names
-E, --ignore-tab-expansionIgnore changes due to tab expansion
-b, --ignore-space-changeIgnore changes in the amount of white space
-w, --ignore-all-spaceIgnore all white space
-B, --ignore-blank-linesIgnore changes whose lines are all blank
-I, --ignore-matching-lines <RE>Ignore changes whose lines all match RE
--strip-trailing-crStrip trailing carriage return on input
-a, --textTreat all files as text
-c, -C, --context <NUM>Output NUM lines of copied context
-u, -U, --unified <NUM>Output NUM lines of unified context
--label <LABEL>Use LABEL instead of file name
-p, --show-c-functionShow which C function each change is in
-F, --show-function-line <RE>Show the most recent line matching RE
-q, --briefOutput only whether files differ
-e, --edOutput an ed script
--normalOutput a normal diff
-n, --rcsOutput an RCS format diff
-y, --side-by-sideOutput in two columns
-W, --width <NUM>Output at most NUM (default 130) print columns
--left-columnOutput only the left column of common lines
--suppress-common-linesDo not output common lines
-D, --ifdef <NAME>Output merged file to show `#ifdef NAME' diffs
-l, --paginatePass the output through `pr' to paginate it
-t, --expand-tabsExpand tabs to spaces in output
-T, --initial-tabMake tabs line up by prepending a tab
-r, --recursiveRecursively compare any subdirectories found
-N, --new-fileTreat absent files as empty
--unidirectional-new-fileTreat absent first files as empty
-s, --report-identical-filesReport when two files are the same
-x, --exclude <PAT>Exclude files that match PAT
-X, --exclude-from <FILE>Exclude files that match any pattern in FILE
-S, --starting-file <FILE>Start with FILE when comparing directories
--from-file <FILE1>Compare FILE1 to all operands. FILE1 can be a directory
--to-file <FILE2>Compare all operands to FILE2. FILE2 can be a directory
--horizon-lines <NUM>Keep NUM lines of the common prefix and suffix
-d, --minimalTry hard to find a smaller set of changes
--speed-large-filesAssume large files and many scattered small changes
-v, --versionOutput version info
--helpShow help
--old-group-format <GFTM>Similar, but format old input groups with GFTM
--new-group-format <GFTM>Similar, but format new input groups with GFTM
--unchanged-group-format <GFTM>Similar, but format unchanged input groups with GFTM
--changed-group-format <GFTM>Similar, but format changed input groups with GFTM
--line-format <LFTM>Format all input lines with LFMT
--old-line-format <LFTM>Format old input lines with LFTM
--new-line-format <LFTM>Format new input lines with LFTM
--unchanged-line-format <LFTM>Format unchanged input lines with LFTM