knowledge/technology/applications/cli/diff.md
2023-12-04 11:02:23 +01:00

1,012 B

obj wiki website repo
application https://en.wikipedia.org/wiki/Diff https://www.gnu.org/software/diffutils/ https://git.savannah.gnu.org/cgit/diffutils.git

diff

compare files line by line
Usage: diff [OPTION]... FILES

Options

Option Description
--normal output a normal diff (the default)
-q, --brief report only when files differ
-s, --report-identical-files report when two files are the same
-c, -C NUM, --context[=NUM] output NUM (default 3) lines of copied context
-u, -U NUM, --unified[=NUM] output NUM (default 3) lines of unified context
-r, --recursive recursively compare any subdirectories found
-a, --text treat all files as text