{
    "content": [
        {
            "type": "text",
            "text": "# REALPATH (man)\n\n## NAME\n\nrealpath - print the resolved path\n\n## SYNOPSIS\n\nrealpath [OPTION]... FILE...\n\n## DESCRIPTION\n\nPrint the resolved absolute file name; all but the last component must exist\n\n## TLDR\n\n> Display the resolved absolute path for a file or directory.\n\n- Display the absolute path for a file or directory:\n  `realpath {{path/to/file_or_directory}}`\n- Require all path components to exist:\n  `realpath {{-e|--canonicalize-existing}} {{path/to/file_or_directory}}`\n- Resolve `..` components before symlinks:\n  `realpath {{-L|--logical}} {{path/to/file_or_directory}}`\n- Disable symlink expansion:\n  `realpath {{-s|--no-symlinks}} {{path/to/file_or_directory}}`\n- Suppress error messages:\n  `realpath {{-q|--quiet}} {{path/to/file_or_directory}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (8 subsections)\n- **AUTHOR**\n- **REPORTING BUGS**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "REALPATH",
        "section": "",
        "mode": "man",
        "summary": "realpath - print the resolved path",
        "synopsis": "realpath [OPTION]... FILE...",
        "tldr_summary": "Display the resolved absolute path for a file or directory.",
        "tldr_examples": [
            {
                "description": "Display the absolute path for a file or directory",
                "command": "realpath {{path/to/file_or_directory}}"
            },
            {
                "description": "Require all path components to exist",
                "command": "realpath {{-e|--canonicalize-existing}} {{path/to/file_or_directory}}"
            },
            {
                "description": "Resolve `..` components before symlinks",
                "command": "realpath {{-L|--logical}} {{path/to/file_or_directory}}"
            },
            {
                "description": "Disable symlink expansion",
                "command": "realpath {{-s|--no-symlinks}} {{path/to/file_or_directory}}"
            },
            {
                "description": "Suppress error messages",
                "command": "realpath {{-q|--quiet}} {{path/to/file_or_directory}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-e",
                "long": "--canonicalize-existing",
                "arg": null,
                "description": "all components of the path must exist"
            },
            {
                "flag": "-m",
                "long": "--canonicalize-missing",
                "arg": null,
                "description": "no path components need exist or be a directory"
            },
            {
                "flag": "-L",
                "long": "--logical",
                "arg": null,
                "description": "resolve '..' components before symlinks"
            },
            {
                "flag": "-P",
                "long": "--physical",
                "arg": null,
                "description": "resolve symlinks as encountered (default)"
            },
            {
                "flag": "-q",
                "long": "--quiet",
                "arg": null,
                "description": "suppress most error messages --relative-to=DIR print the resolved path relative to DIR --relative-base=DIR print absolute paths unless paths below DIR"
            },
            {
                "flag": "-s",
                "long": "--no-symlinks",
                "arg": null,
                "description": "don't expand symlinks"
            },
            {
                "flag": "-z",
                "long": "--zero",
                "arg": null,
                "description": "end each output line with NUL, not newline --help display this help and exit"
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "output version information and exit"
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "readlink",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/readlink/1/json"
            },
            {
                "name": "readlink",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/readlink/2/json"
            },
            {
                "name": "realpath",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/realpath/3/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": [
                    {
                        "name": "-e --canonicalize-existing",
                        "lines": 2,
                        "flag": "-e",
                        "long": "--canonicalize-existing"
                    },
                    {
                        "name": "-m --canonicalize-missing",
                        "lines": 2,
                        "flag": "-m",
                        "long": "--canonicalize-missing"
                    },
                    {
                        "name": "-L --logical",
                        "lines": 2,
                        "flag": "-L",
                        "long": "--logical"
                    },
                    {
                        "name": "-P --physical",
                        "lines": 2,
                        "flag": "-P",
                        "long": "--physical"
                    },
                    {
                        "name": "-q --quiet",
                        "lines": 8,
                        "flag": "-q",
                        "long": "--quiet"
                    },
                    {
                        "name": "-s --strip --no-symlinks",
                        "lines": 2,
                        "flag": "-s",
                        "long": "--no-symlinks"
                    },
                    {
                        "name": "-z --zero",
                        "lines": 4,
                        "flag": "-z",
                        "long": "--zero"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 8,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "realpath - print the resolved path\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "realpath [OPTION]... FILE...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Print the resolved absolute file name; all but the last component must exist\n",
                "subsections": [
                    {
                        "name": "-e --canonicalize-existing",
                        "content": "all components of the path must exist\n",
                        "flag": "-e",
                        "long": "--canonicalize-existing"
                    },
                    {
                        "name": "-m --canonicalize-missing",
                        "content": "no path components need exist or be a directory\n",
                        "flag": "-m",
                        "long": "--canonicalize-missing"
                    },
                    {
                        "name": "-L --logical",
                        "content": "resolve '..' components before symlinks\n",
                        "flag": "-L",
                        "long": "--logical"
                    },
                    {
                        "name": "-P --physical",
                        "content": "resolve symlinks as encountered (default)\n",
                        "flag": "-P",
                        "long": "--physical"
                    },
                    {
                        "name": "-q --quiet",
                        "content": "suppress most error messages\n\n--relative-to=DIR\nprint the resolved path relative to DIR\n\n--relative-base=DIR\nprint absolute paths unless paths below DIR\n",
                        "flag": "-q",
                        "long": "--quiet"
                    },
                    {
                        "name": "-s --strip --no-symlinks",
                        "content": "don't expand symlinks\n",
                        "flag": "-s",
                        "long": "--no-symlinks"
                    },
                    {
                        "name": "-z --zero",
                        "content": "end each output line with NUL, not newline\n\n--help display this help and exit\n",
                        "flag": "-z",
                        "long": "--zero"
                    },
                    {
                        "name": "--version",
                        "content": "output version information and exit\n",
                        "long": "--version"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Written by Padraig Brady.\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "GNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright  ©  2020 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3 or later\n<https://gnu.org/licenses/gpl.html>.\nThis is free software: you are free to change and redistribute it.  There is NO WARRANTY,  to\nthe extent permitted by law.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "readlink(1), readlink(2), realpath(3)\n\nFull documentation <https://www.gnu.org/software/coreutils/realpath>\nor available locally via: info '(coreutils) realpath invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                 REALPATH(1)",
                "subsections": []
            }
        }
    }
}