diff <command...>

Compare files line by line

Arguments

NameDescription
commandfilepaths

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 <command>Ignore changes whose lines all match RE
--strip-trailing-crStrip trailing carriage return on input
-a,--textTreat all files as text
-c,-C,--context <command>Output NUM lines of copied context
-u,-U,--unified <command>Output NUM lines of unified context
--label <command>Use LABEL instead of file name
-p,--show-c-functionShow which C function each change is in
-F,--show-function-line <command>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 <command>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 <command>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 <command>Exclude files that match PAT
-X,--exclude-from <command>Exclude files that match any pattern in FILE
-S,--starting-file <command>Start with FILE when comparing directories
--from-file <command>Compare FILE1 to all operands. FILE1 can be a directory
--to-file <command>Compare all operands to FILE2. FILE2 can be a directory
--horizon-lines <command>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 <command>Similar, but format old input groups with GFTM
--new-group-format <command>Similar, but format new input groups with GFTM
--unchanged-group-format <command>Similar, but format unchanged input groups with GFTM
--changed-group-format <command>Similar, but format changed input groups with GFTM
--line-format <command>Format all input lines with LFMT
--old-line-format <command>Format old input lines with LFTM
--new-line-format <command>Format new input lines with LFTM
--unchanged-line-format <command>Format unchanged input lines with LFTM