{
    "content": [
        {
            "type": "text",
            "text": "# diff (info)\n\n## Sections\n\n- **13 Invoking 'diff'** (1 subsections)\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "diff",
        "section": "",
        "mode": "info",
        "summary": null,
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "13 Invoking 'diff'",
                "lines": 38,
                "subsections": [
                    {
                        "name": "13.1 Options to 'diff'",
                        "lines": 306
                    }
                ]
            }
        ],
        "sections": {
            "13 Invoking 'diff'": {
                "content": "The format for running the 'diff' command is:\n\ndiff OPTIONS... FILES...\n\nIn the simplest case, two file names FROM-FILE and TO-FILE are given,\nand 'diff' compares the contents of FROM-FILE and TO-FILE.  A file name\nof '-' stands for the standard input.\n\nIf one file is a directory and the other is not, 'diff' compares the\nfile in the directory whose name is that of the non-directory.  The\nnon-directory file must not be '-'.\n\nIf two file names are given and both are directories, 'diff' compares\ncorresponding files in both directories, in alphabetical order; this\ncomparison is not recursive unless the '--recursive' ('-r') option is\ngiven.  'diff' never compares the actual contents of a directory as if\nit were a file.  The file that is fully specified may not be standard\ninput, because standard input is nameless and the notion of \"file with\nthe same name\" does not apply.\n\nIf the '--from-file=FILE' option is given, the number of file names\nis arbitrary, and FILE is compared to each named file.  Similarly, if\nthe '--to-file=FILE' option is given, each named file is compared to\nFILE.\n\n'diff' options begin with '-', so normally file names may not begin\nwith '-'.  However, '--' as an argument by itself treats the remaining\narguments as file names even if they begin with '-'.\n\nAn exit status of 0 means no differences were found, 1 means some\ndifferences were found, and 2 means trouble.\n\n* Menu:\n\n* diff Options:: Summary of options to 'diff'.\n\nFile: diffutils.info,  Node: diff Options,  Up: Invoking diff\n",
                "subsections": [
                    {
                        "name": "13.1 Options to 'diff'",
                        "content": "Below is a summary of all of the options that GNU 'diff' accepts.  Most\noptions have two equivalent names, one of which is a single letter\npreceded by '-', and the other of which is a long name preceded by '--'.\nMultiple single letter options (unless they take an argument) can be\ncombined into a single command line word: '-ac' is equivalent to '-a\n-c'.  Long named options can be abbreviated to any unique prefix of\ntheir name.  Brackets ([ and ]) indicate that an option takes an\noptional argument.\n\n'-a'\n'--text'\nTreat all files as text and compare them line-by-line, even if they\ndo not seem to be text.  *Note Binary::.\n\n'-b'\n'--ignore-space-change'\nIgnore changes in amount of white space.  *Note White Space::.\n\n'-B'\n'--ignore-blank-lines'\nIgnore changes that just insert or delete blank lines.  *Note Blank\nLines::.\n\n'--binary'\nRead and write data in binary mode.  *Note Binary::.\n\n'-c'\nUse the context output format, showing three lines of context.\n*Note Context Format::.\n\n'--color [=WHEN]'\nSpecify whether to use color for distinguishing different contexts,\nlike header, added or removed lines.  WHEN may be omitted, or one\nof:\n* none Do not use color at all.  This is the default when no\n-color option is specified.\n* auto Use color only if standard output is a terminal.\n* always Always use color.\nSpecifying '--color' and no WHEN is equivalent to '--color=auto'.\n\n'-C LINES'\n'--context[=LINES]'\nUse the context output format, showing LINES (an integer) lines of\ncontext, or three if LINES is not given.  *Note Context Format::.\nFor proper operation, 'patch' typically needs at least two lines of\ncontext.\n\nFor compatibility 'diff' also supports an obsolete option syntax\n'-LINES' that has effect when combined with '-c', '-p', or '-u'.\nNew scripts should use '-U LINES' ('-C LINES') instead.\n\n'--changed-group-format=FORMAT'\nUse FORMAT to output a line group containing differing lines from\nboth files in if-then-else format.  *Note Line Group Formats::.\n\n'-d'\n'--minimal'\nChange the algorithm perhaps find a smaller set of changes.  This\nmakes 'diff' slower (sometimes much slower).  *Note diff\nPerformance::.\n\n'-D NAME'\n'--ifdef=NAME'\nMake merged '#ifdef' format output, conditional on the preprocessor\nmacro NAME.  *Note If-then-else::.\n\n'-e'\n'--ed'\nMake output that is a valid 'ed' script.  *Note ed Scripts::.\n\n'-E'\n'--ignore-tab-expansion'\nIgnore changes due to tab expansion.  *Note White Space::.\n\n'-f'\n'--forward-ed'\nMake output that looks vaguely like an 'ed' script but has changes\nin the order they appear in the file.  *Note Forward ed::.\n\n'-F REGEXP'\n'--show-function-line=REGEXP'\nIn context and unified format, for each hunk of differences, show\nsome of the last preceding line that matches REGEXP.  *Note\nSpecified Headings::.\n\n'--from-file=FILE'\nCompare FILE to each operand; FILE may be a directory.\n\n'--help'\nOutput a summary of usage and then exit.\n\n'--horizon-lines=LINES'\nDo not discard the last LINES lines of the common prefix and the\nfirst LINES lines of the common suffix.  *Note diff Performance::.\n\n'-i'\n'--ignore-case'\nIgnore changes in case; consider upper- and lower-case letters\nequivalent.  *Note Case Folding::.\n\n'-I REGEXP'\n'--ignore-matching-lines=REGEXP'\nIgnore changes that just insert or delete lines that match REGEXP.\n*Note Specified Lines::.\n\n'--ignore-file-name-case'\nIgnore case when comparing file names.  For example, recursive\ncomparison of 'd' to 'e' might compare the contents of 'd/Init' and\n'e/inIt'.  At the top level, 'diff d inIt' might compare the\ncontents of 'd/Init' and 'inIt'.  *Note Comparing Directories::.\n\n'-l'\n'--paginate'\nPass the output through 'pr' to paginate it.  *Note Pagination::.\n\n'-L LABEL'\n'--label=LABEL'\nUse LABEL instead of the file name in the context format (*note\nContext Format::) and unified format (*note Unified Format::)\nheaders.  *Note RCS::.\n\n'--left-column'\nPrint only the left column of two common lines in side by side\nformat.  *Note Side by Side Format::.\n\n'--line-format=FORMAT'\nUse FORMAT to output all input lines in if-then-else format.  *Note\nLine Formats::.\n\n'-n'\n'--rcs'\nOutput RCS-format diffs; like '-f' except that each command\nspecifies the number of lines affected.  *Note RCS::.\n\n'-N'\n'--new-file'\nIf one file is missing, treat it as present but empty.  *Note\nComparing Directories::.\n\n'--new-group-format=FORMAT'\nUse FORMAT to output a group of lines taken from just the second\nfile in if-then-else format.  *Note Line Group Formats::.\n\n'--new-line-format=FORMAT'\nUse FORMAT to output a line taken from just the second file in\nif-then-else format.  *Note Line Formats::.\n\n'--no-dereference'\nAct on symbolic links themselves instead of what they point to.\nTwo symbolic links are deemed equal only when each points to\nprecisely the same name.\n\n'--old-group-format=FORMAT'\nUse FORMAT to output a group of lines taken from just the first\nfile in if-then-else format.  *Note Line Group Formats::.\n\n'--old-line-format=FORMAT'\nUse FORMAT to output a line taken from just the first file in\nif-then-else format.  *Note Line Formats::.\n\n'-p'\n'--show-c-function'\nShow which C function each change is in.  *Note C Function\nHeadings::.\n\n'--palette=PALETTE'\nSpecify what color palette to use when colored output is enabled.\nIt defaults to 'rs=0:hd=1:ad=32:de=31:ln=36' for red deleted lines,\ngreen added lines, cyan line numbers, bold header.\n\nSupported capabilities are as follows.\n\n'ad=32'\n\nSGR substring for added lines.  The default is green\nforeground.\n\n'de=31'\n\nSGR substring for deleted lines.  The default is red\nforeground.\n\n'hd=1'\n\nSGR substring for chunk header.  The default is bold\nforeground.\n\n'ln=36'\n\nSGR substring for line numbers.  The default is cyan\nforeground.\n\n'-q'\n'--brief'\nReport only whether the files differ, not the details of the\ndifferences.  *Note Brief::.\n\n'-r'\n'--recursive'\nWhen comparing directories, recursively compare any subdirectories\nfound.  *Note Comparing Directories::.\n\n'-s'\n'--report-identical-files'\nReport when two files are the same.  *Note Comparing Directories::.\n\n'-S FILE'\n'--starting-file=FILE'\nWhen comparing directories, start with the file FILE.  This is used\nfor resuming an aborted comparison.  *Note Comparing Directories::.\n\n'--speed-large-files'\nUse heuristics to speed handling of large files that have numerous\nscattered small changes.  *Note diff Performance::.\n\n'--strip-trailing-cr'\nStrip any trailing carriage return at the end of an input line.\n*Note Binary::.\n\n'--suppress-common-lines'\nDo not print common lines in side by side format.  *Note Side by\nSide Format::.\n\n'-t'\n'--expand-tabs'\nExpand tabs to spaces in the output, to preserve the alignment of\ntabs in the input files.  *Note Tabs::.\n\n'-T'\n'--initial-tab'\nOutput a tab rather than a space before the text of a line in\nnormal or context format.  This causes the alignment of tabs in the\nline to look normal.  *Note Tabs::.\n\n'--tabsize=COLUMNS'\nAssume that tab stops are set every COLUMNS (default 8) print\ncolumns.  *Note Tabs::.\n\n'--suppress-blank-empty'\nSuppress any blanks before newlines when printing the\nrepresentation of an empty line, when outputting normal, context,\nor unified format.  *Note Trailing Blanks::.\n\n'--to-file=FILE'\nCompare each operand to FILE; FILE may be a directory.\n\n'-u'\nUse the unified output format, showing three lines of context.\n*Note Unified Format::.\n\n'--unchanged-group-format=FORMAT'\nUse FORMAT to output a group of common lines taken from both files\nin if-then-else format.  *Note Line Group Formats::.\n\n'--unchanged-line-format=FORMAT'\nUse FORMAT to output a line common to both files in if-then-else\nformat.  *Note Line Formats::.\n\n'--unidirectional-new-file'\nIf a first file is missing, treat it as present but empty.  *Note\nComparing Directories::.\n\n'-U LINES'\n'--unified[=LINES]'\nUse the unified output format, showing LINES (an integer) lines of\ncontext, or three if LINES is not given.  *Note Unified Format::.\nFor proper operation, 'patch' typically needs at least two lines of\ncontext.\n\nOn older systems, 'diff' supports an obsolete option '-LINES' that\nhas effect when combined with '-u'.  POSIX 1003.1-2001 (*note\nStandards conformance::) does not allow this; use '-U LINES'\ninstead.\n\n'-v'\n'--version'\nOutput version information and then exit.\n\n'-w'\n'--ignore-all-space'\nIgnore white space when comparing lines.  *Note White Space::.\n\n'-W COLUMNS'\n'--width=COLUMNS'\nOutput at most COLUMNS (default 130) print columns per line in side\nby side format.  *Note Side by Side Format::.\n\n'-x PATTERN'\n'--exclude=PATTERN'\nWhen comparing directories, ignore files and subdirectories whose\nbasenames match PATTERN.  *Note Comparing Directories::.\n\n'-X FILE'\n'--exclude-from=FILE'\nWhen comparing directories, ignore files and subdirectories whose\nbasenames match any pattern contained in FILE.  *Note Comparing\nDirectories::.\n\n'-y'\n'--side-by-side'\nUse the side by side output format.  *Note Side by Side Format::.\n\n'-Z'\n'--ignore-trailing-space'\nIgnore white space at line end.  *Note White Space::.\n"
                    }
                ]
            }
        }
    }
}