Title: Theory / Unimportant / CS / command line / text analysis / diff
Tags: fromCommand fromCommandLine computer_to_instruction hasNotNewEffectReturnsMeaning some_instruction Variable_missing_meaning variable
On every note of this deck, unless a note says otherwise:
Page: man
Prefix: diff

Fla: --brief
Effect: report only when files differ
Flag abbreviation: -q

Fla: --report-identical-files
Effect: report when two files are the same
Flag abbreviation: -s

Fla: --context=num
Effect: output NUM (default 3) lines of copied context
Flag abbreviation: -c, -C num

Fla: --unified[=NUM]
Effect: output NUM (default 3) lines of unified context
Flag abbreviation: -u, -U NUM

Fla: --ed
Effect: output an ed script
Flag abbreviation: -e

Fla: --rcs
Effect: output an RCS format diff
Flag abbreviation: -n

Fla: --side-by-side
Effect: output in two columns
Flag abbreviation: -y

Fla: --width=NUM
Effect: output at most NUM print columns
Flag abbreviation: -W
Default: 130

Fla: --show-c-function
Effect: show which C function each change is in
Flag abbreviation: -p

Fla: --show-function-line=RE
Effect: show the most recent line matching RE
Flag abbreviation: -F

Fla: --label LABEL
Effect: use LABEL instead of file name and timestamp (can be repeated)

Fla: --expand-tabs
Effect: expand tabs to spaces in output
Flag abbreviation: -t

Fla: --initial-tab
Effect: make tabs line up by prepending a tab
Flag abbreviation: -T

Fla: --paginate
Effect: pass output through 'pr' to paginate it
Flag abbreviation: -l

Fla: --recursive
Effect: recursively compare any subdirectories found
Flag abbreviation: -r

Fla: --new-ifile
Effect: treat absent files as empty
Flag abbreviation: -N

Fla: --exclude=PAT
Effect: exclude files that match PAT
Flag abbreviation: -x

Fla: --exclude-from=FILE
Effect: exclude files that match any pattern in FILE
Flag abbreviation: -X

Fla: --starting-file=FILE
Effect: start with FILE when comparing directories
Flag abbreviation: -S

Fla: --from-file=FILE1
Effect: compare FILE1 to all operands; FILE1 can be a directory

Fla: --to-file=FILE2
Effect: compare all operands to FILE2; FILE2 can be a directory

Fla: --ignore-case
Effect: ignore case differences in file contents
Flag abbreviation: -i

Fla: --ignore-tab-expansion
Effect: ignore changes due to tab expansion
Flag abbreviation: -E

Fla: --ignore-trailing-space
Effect: ignore white space at line end
Flag abbreviation: -Z

Fla: --ignore-space-change
Effect: ignore changes in the amount of white space
Flag abbreviation: -b

Fla: --ignore-all-space
Effect: ignore all white space
Flag abbreviation: -w

Fla: --ignore-blank-lines
Effect: ignore changes where lines are all blank
Flag abbreviation: -B

Fla: --ignore-matching-lines=RE
Effect: ignore changes where all lines match RE
Flag abbreviation: -I

Fla: --text
Effect: treat all files as text
Flag abbreviation: -a
Intuition: assume all files are text

Fla: --strip-trailing-cr
Effect: strip trailing carriage return on input

Fla: --ifdef=NAME
Effect: output merged file with '#ifdef NAME' diffs
Flag abbreviation: -D

Fla: --GTYPE-group-format=GFMT
Effect: format GTYPE input groups with GFMT

Fla: --line-format=LFMT
Effect: format all input lines with LFMT

Fla: --LTYPE-line-format=LFMT
Effect: format LTYPE input lines with LFMT

Fla: --minimal
Effect: try hard to find a smaller set of changes
Flag abbreviation: -d

Fla: --horizon-lines=NUM
Effect: keep NUM lines of the common prefix and suffix

Fla: --speed-large-files
Effect: assume large files and many scattered small changes

Fla: --color[=WHEN]
Effect: colorize the output;
Variables: WHEN can be 'never', 'always', or 'auto' (the default)

Fla: --palette=PALETTE
Effect: specify the colors to use when --color is active PALETTE is a colon-separated list terminfo capabilities

Fla: --help
Effect: display this help and exit

Fla: --version
Effect: output version information and exit
Flag abbreviation: -v

Instruction: diff
Page: man
Effect: compare files line by line
Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.

Fla: --normal
Effect: output a normal diff (the default)

Fla: --left-column
Effect: output only the left column of common lines

Fla: --suppress-common-lines
Effect: do not output common lines

Fla: --suppress-blank-empty
Effect: suppress space or tab before empty output lines

Fla: --no-dereference
Effect: don't follow symbolic links

Fla: --unidirectional-new-file
Effect: treat absent first files as empty

Fla: --ignore-file-name-case
Effect: ignore case when comparing file names

Fla: --no-ignore-file-name-case
Effect: consider case when comparing file names

Fla: --tabsize=NUM
Effect: tab stops every NUM print columns
Default: 8