Compare files line by line
diff --normal {normal} -q {brief} -s {report-identical-files} -c {context} -u {unified} ๐ normal ๐ brief ๐ report-identical-files ๐ context ๐ unified diff --normal {normal} -q {brief} -s {report-identical-files} -c {context} -u {unified} Sandbox: execFile · Timeout: 30s
system.file.diff system.file.search system.file.process system.file.copy system.file.move system.file.delete | Name | Type | Required | Default | Description | Aliases |
|---|---|---|---|---|---|
normal | string | No | - | output a normal diff (the default) | --normal |
brief | string | No | - | report only when files differ | -q, --brief |
report-identical-files | string | No | - | Set the report-identical-files parameter | -s, --report-identical-files |
context | string | No | - | output NUM (default 3) lines of copied context | -c, -C, --context |
unified | string | No | - | output NUM (default 3) lines of unified context | -u, -U, --unified |
ed | string | No | - | output an ed script | -e, --ed |
rcs | string | No | - | output an RCS format diff | -n, --rcs |
side-by-side | string | No | - | output in two columns | -y, --side-by-side |
width | integer | No | - | output at most NUM (default 130) print columns | -W, --width |
left-column | string | No | - | output only the left column of common lines | --left-column |
suppress-common-lines | string | No | - | do not output common lines | --suppress-common-lines |
show-c-function | string | No | - | show which C function each change is in | -p, --show-c-function |
show-function-line | string | No | - | show the most recent line matching RE | -F, --show-function-line |
label LABEL | string | No | - | use LABEL instead of file name and timestamp | --label LABEL |
expand-tabs | string | No | - | expand tabs to spaces in output | -t, --expand-tabs |
initial-tab | string | No | - | make tabs line up by prepending a tab | -T, --initial-tab |
tabsize | integer | No | - | tab stops every NUM (default 8) print columns | --tabsize |
suppress-blank-empty | string | No | - | suppress space or tab before empty output lines | --suppress-blank-empty |
paginate | string | No | - | pass output through 'pr' to paginate it | -l, --paginate |
recursive | string | No | - | recursively compare any subdirectories found | -r, --recursive |
no-dereference | string | No | - | don't follow symbolic links | --no-dereference |
new-file | string | No | - | treat absent files as empty | -N, --new-file |
unidirectional-new-file | string | No | - | treat absent first files as empty | --unidirectional-new-file |
ignore-file-name-case | string | No | - | ignore case when comparing file names | --ignore-file-name-case |
no-ignore-file-name-case | string | No | - | Set the no-ignore-file-name-case parameter | --no-ignore-file-name-case |
exclude | string | No | - | exclude files that match PAT | -x, --exclude |
exclude-from | file | No | - | exclude files that match any pattern in FILE | -X, --exclude-from |
starting-file | file | No | - | start with FILE when comparing directories | -S, --starting-file |
from-file | file | No | - | compare FILE1 to all operands | --from-file |
to-file | file | No | - | compare all operands to FILE2 | --to-file |
GTYPE-group-format | string | No | - | format GTYPE input groups with GFMT | --GTYPE-group-format |
LTYPE-line-format | string | No | - | format LTYPE input lines with LFMT | --LTYPE-line-format |
help | string | No | - | display this help and exit | --help |
horizon-lines | integer | No | - | --speed-large-files assume large files and many scattered small changes --color[=WHEN] color output; WHEN is 'never', 'always', or 'auto'; plain --color means --color='auto' --palette=PALETTE the colors to use when --color is active; PALETTE is a colon-separated list of terminfo capabilities | --horizon-lines |
ifdef | string | No | - | output merged file with '#ifdef NAME' diffs | -D, --ifdef |
ignore-all-space | string | No | - | ignore all white space | -w, --ignore-all-space |
ignore-blank-lines | string | No | - | ignore changes where lines are all blank | -B, --ignore-blank-lines |
ignore-case | string | No | - | ignore case differences in file contents | -i, --ignore-case |
ignore-matching-lines | string | No | - | -I, --ignore-matching-lines | |
ignore-space-change | string | No | - | ignore changes in the amount of white space | -b, --ignore-space-change |
ignore-tab-expansion | string | No | - | ignore changes due to tab expansion | -E, --ignore-tab-expansion |
ignore-trailing-space | string | No | - | ignore white space at line end | -Z, --ignore-trailing-space |
line-format | string | No | - | format all input lines with LFMT | --line-format |
minimal | string | No | - | try hard to find a smaller set of changes | -d, --minimal |
palette | boolean | No | - | is active; PALETTE is | --palette, --color |
speed_large_files | boolean | No | - | assume large files and many scattered small changes | --speed-large-files |
strip-trailing-cr | string | No | - | strip trailing carriage return on input | --strip-trailing-cr |
text | string | No | - | treat all files as text | -a, --text |
version | string | No | - | output version information and exit | -v, --version |
Basic usage with normal
diff ${normal} Display help message
diff --help diff is a command-line utility for compare files line by line.
diff --normal {normal} -q {brief} -s {report-identical-files} -c {context} -u {unified}