{
    "content": [
        {
            "type": "text",
            "text": "# readlink (man)\n\n## NAME\n\nreadlink - print resolved symbolic links or canonical file names\n\n## SYNOPSIS\n\nreadlink [OPTION]... FILE...\n\n## DESCRIPTION\n\nNote realpath(1) is the preferred command to use for canonicalization functionality.\n\n## TLDR\n\n> Follow symlinks and get symlink information.\n\n- Get the actual file to which the symlink points:\n  `readlink {{path/to/file}}`\n- Get the absolute path to a file:\n  `readlink {{-f|--canonicalize}} {{path/to/file}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (9 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": "readlink",
        "section": "",
        "mode": "man",
        "summary": "readlink - print resolved symbolic links or canonical file names",
        "synopsis": "readlink [OPTION]... FILE...",
        "tldr_summary": "Follow symlinks and get symlink information.",
        "tldr_examples": [
            {
                "description": "Get the actual file to which the symlink points",
                "command": "readlink {{path/to/file}}"
            },
            {
                "description": "Get the absolute path to a file",
                "command": "readlink {{-f|--canonicalize}} {{path/to/file}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-f",
                "long": "--canonicalize",
                "arg": null,
                "description": "canonicalize by following every symlink in every component of the given name recur‐ sively; all but the last component must exist"
            },
            {
                "flag": "-e",
                "long": "--canonicalize-existing",
                "arg": null,
                "description": "canonicalize by following every symlink in every component of the given name recur‐ sively, all components must exist"
            },
            {
                "flag": "-m",
                "long": "--canonicalize-missing",
                "arg": null,
                "description": "canonicalize by following every symlink in every component of the given name recur‐ sively, without requirements on components existence"
            },
            {
                "flag": "-n",
                "long": "--no-newline",
                "arg": null,
                "description": "do not output the trailing delimiter"
            },
            {
                "flag": "-q",
                "long": "--quiet",
                "arg": null,
                "description": ""
            },
            {
                "flag": "-s",
                "long": "--silent",
                "arg": null,
                "description": "suppress most error messages (on by default)"
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "report error messages"
            },
            {
                "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": "realpath",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/realpath/1/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": 4,
                "subsections": [
                    {
                        "name": "-f --canonicalize",
                        "lines": 3,
                        "flag": "-f",
                        "long": "--canonicalize"
                    },
                    {
                        "name": "-e --canonicalize-existing",
                        "lines": 3,
                        "flag": "-e",
                        "long": "--canonicalize-existing"
                    },
                    {
                        "name": "-m --canonicalize-missing",
                        "lines": 3,
                        "flag": "-m",
                        "long": "--canonicalize-missing"
                    },
                    {
                        "name": "-n --no-newline",
                        "lines": 2,
                        "flag": "-n",
                        "long": "--no-newline"
                    },
                    {
                        "name": "-q --quiet",
                        "lines": 1,
                        "flag": "-q",
                        "long": "--quiet"
                    },
                    {
                        "name": "-s --silent",
                        "lines": 2,
                        "flag": "-s",
                        "long": "--silent"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "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": "readlink - print resolved symbolic links or canonical file names\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "readlink [OPTION]... FILE...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Note realpath(1) is the preferred command to use for canonicalization functionality.\n\nPrint value of a symbolic link or canonical file name\n",
                "subsections": [
                    {
                        "name": "-f --canonicalize",
                        "content": "canonicalize  by  following  every symlink in every component of the given name recur‐\nsively; all but the last component must exist\n",
                        "flag": "-f",
                        "long": "--canonicalize"
                    },
                    {
                        "name": "-e --canonicalize-existing",
                        "content": "canonicalize by following every symlink in every component of the  given  name  recur‐\nsively, all components must exist\n",
                        "flag": "-e",
                        "long": "--canonicalize-existing"
                    },
                    {
                        "name": "-m --canonicalize-missing",
                        "content": "canonicalize  by  following  every symlink in every component of the given name recur‐\nsively, without requirements on components existence\n",
                        "flag": "-m",
                        "long": "--canonicalize-missing"
                    },
                    {
                        "name": "-n --no-newline",
                        "content": "do not output the trailing delimiter\n",
                        "flag": "-n",
                        "long": "--no-newline"
                    },
                    {
                        "name": "-q --quiet",
                        "content": "",
                        "flag": "-q",
                        "long": "--quiet"
                    },
                    {
                        "name": "-s --silent",
                        "content": "suppress most error messages (on by default)\n",
                        "flag": "-s",
                        "long": "--silent"
                    },
                    {
                        "name": "-v --verbose",
                        "content": "report error messages\n",
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "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 Dmitry V. Levin.\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(2), realpath(1), realpath(3)\n\nFull documentation <https://www.gnu.org/software/coreutils/readlink>\nor available locally via: info '(coreutils) readlink invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                 READLINK(1)",
                "subsections": []
            }
        }
    }
}