{
    "content": [
        {
            "type": "text",
            "text": "# ln(1) (man)\n\n**Summary:** ln - make links between files\n\n**Synopsis:** ln [OPTION]... [-T] TARGET LINKNAME\nln [OPTION]... TARGET\nln [OPTION]... TARGET... DIRECTORY\nln [OPTION]... -t DIRECTORY TARGET...\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -b | --backup | — |  |\n| -F | --directory | — | allow the superuser to attempt to hard link directories (note: will probably fail due to system restrictions, even for t |\n| -f | --force | — | remove existing destination files |\n| -i | --interactive | — | prompt whether to remove destinations |\n| -L | --logical | — | dereference TARGETs that are symbolic links |\n| -n | --no-dereference | — | treat LINKNAME as a normal file if it is a symbolic link to a directory |\n| -P | --physical | — | make hard links directly to symbolic links |\n| -r | --relative | — | create symbolic links relative to link location |\n| -s | --symbolic | — | make symbolic links instead of hard links |\n| -S | --suffix | — | override the usual backup suffix |\n| -t | --target-directory | — | specify the DIRECTORY in which to create the links |\n| -T | --no-target-directory | — | treat LINKNAME as a normal file always |\n| -v | --verbose | — | print name of each linked file --help display this help and exit |\n| — | --version | — | output version information and exit The backup suffix is '~', unless set with --suffix or SIMPLEBACKUPSUFFIX. The versio |\n\n## See Also\n\n- link(2)\n- symlink(2)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (5 lines)\n- **DESCRIPTION** (12 lines) — 14 subsections\n  - -b --backup (1 lines)\n  - -d -F --directory (3 lines)\n  - -f --force (2 lines)\n  - -i --interactive (2 lines)\n  - -L --logical (2 lines)\n  - -n --no-dereference (2 lines)\n  - -P --physical (2 lines)\n  - -r --relative (2 lines)\n  - -s --symbolic (2 lines)\n  - -S --suffix (2 lines)\n  - -t --target-directory (2 lines)\n  - -T --no-target-directory (2 lines)\n  - -v --verbose (4 lines)\n  - --version (21 lines)\n- **AUTHOR** (2 lines)\n- **REPORTING BUGS** (3 lines)\n- **COPYRIGHT** (5 lines)\n- **SEE ALSO** (8 lines)\n\n## Full Content\n\n### NAME\n\nln - make links between files\n\n### SYNOPSIS\n\nln [OPTION]... [-T] TARGET LINKNAME\nln [OPTION]... TARGET\nln [OPTION]... TARGET... DIRECTORY\nln [OPTION]... -t DIRECTORY TARGET...\n\n### DESCRIPTION\n\nIn  the 1st form, create a link to TARGET with the name LINKNAME.  In the 2nd form, create a\nlink to TARGET in the current directory.  In the 3rd and 4th forms, create links to each TAR‐\nGET in DIRECTORY.  Create hard links by default, symbolic links with --symbolic.  By default,\neach destination (name of new link) should not already exist.  When creating hard links, each\nTARGET  must  exist.   Symbolic  links can hold arbitrary text; if later resolved, a relative\nlink is interpreted in relation to its parent directory.\n\nMandatory arguments to long options are mandatory for short options too.\n\n--backup[=CONTROL]\nmake a backup of each existing destination file\n\n#### -b --backup\n\n#### -d -F --directory\n\nallow the superuser to attempt to hard link directories (note: will probably fail  due\nto system restrictions, even for the superuser)\n\n#### -f --force\n\nremove existing destination files\n\n#### -i --interactive\n\nprompt whether to remove destinations\n\n#### -L --logical\n\ndereference TARGETs that are symbolic links\n\n#### -n --no-dereference\n\ntreat LINKNAME as a normal file if it is a symbolic link to a directory\n\n#### -P --physical\n\nmake hard links directly to symbolic links\n\n#### -r --relative\n\ncreate symbolic links relative to link location\n\n#### -s --symbolic\n\nmake symbolic links instead of hard links\n\n#### -S --suffix\n\noverride the usual backup suffix\n\n#### -t --target-directory\n\nspecify the DIRECTORY in which to create the links\n\n#### -T --no-target-directory\n\ntreat LINKNAME as a normal file always\n\n#### -v --verbose\n\nprint name of each linked file\n\n--help display this help and exit\n\n#### --version\n\noutput version information and exit\n\nThe backup suffix is '~', unless set with --suffix or SIMPLEBACKUPSUFFIX.  The version con‐\ntrol method may be selected via the --backup option or through the  VERSIONCONTROL  environ‐\nment variable.  Here are the values:\n\nnone, off\nnever make backups (even if --backup is given)\n\nnumbered, t\nmake numbered backups\n\nexisting, nil\nnumbered if numbered backups exist, simple otherwise\n\nsimple, never\nalways make simple backups\n\nUsing  -s  ignores  -L and -P.  Otherwise, the last option specified controls behavior when a\nTARGET is a symbolic link, defaulting to -P.\n\n### AUTHOR\n\nWritten by Mike Parker and David MacKenzie.\n\n### REPORTING BUGS\n\nGNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n\n### COPYRIGHT\n\nCopyright © 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\n### SEE ALSO\n\nlink(2), symlink(2)\n\nFull documentation <https://www.gnu.org/software/coreutils/ln>\nor available locally via: info '(coreutils) ln invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                       LN(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "ln",
        "section": "1",
        "mode": "man",
        "summary": "ln - make links between files",
        "synopsis": "ln [OPTION]... [-T] TARGET LINKNAME\nln [OPTION]... TARGET\nln [OPTION]... TARGET... DIRECTORY\nln [OPTION]... -t DIRECTORY TARGET...",
        "flags": [
            {
                "flag": "-b",
                "long": "--backup",
                "arg": null,
                "description": ""
            },
            {
                "flag": "-F",
                "long": "--directory",
                "arg": null,
                "description": "allow the superuser to attempt to hard link directories (note: will probably fail due to system restrictions, even for the superuser)"
            },
            {
                "flag": "-f",
                "long": "--force",
                "arg": null,
                "description": "remove existing destination files"
            },
            {
                "flag": "-i",
                "long": "--interactive",
                "arg": null,
                "description": "prompt whether to remove destinations"
            },
            {
                "flag": "-L",
                "long": "--logical",
                "arg": null,
                "description": "dereference TARGETs that are symbolic links"
            },
            {
                "flag": "-n",
                "long": "--no-dereference",
                "arg": null,
                "description": "treat LINKNAME as a normal file if it is a symbolic link to a directory"
            },
            {
                "flag": "-P",
                "long": "--physical",
                "arg": null,
                "description": "make hard links directly to symbolic links"
            },
            {
                "flag": "-r",
                "long": "--relative",
                "arg": null,
                "description": "create symbolic links relative to link location"
            },
            {
                "flag": "-s",
                "long": "--symbolic",
                "arg": null,
                "description": "make symbolic links instead of hard links"
            },
            {
                "flag": "-S",
                "long": "--suffix",
                "arg": null,
                "description": "override the usual backup suffix"
            },
            {
                "flag": "-t",
                "long": "--target-directory",
                "arg": null,
                "description": "specify the DIRECTORY in which to create the links"
            },
            {
                "flag": "-T",
                "long": "--no-target-directory",
                "arg": null,
                "description": "treat LINKNAME as a normal file always"
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "print name of each linked file --help display this help and exit"
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "output version information and exit The backup suffix is '~', unless set with --suffix or SIMPLEBACKUPSUFFIX. The version con‐ trol method may be selected via the --backup option or through the VERSIONCONTROL environ‐ ment variable. Here are the values: none, off never make backups (even if --backup is given) numbered, t make numbered backups existing, nil numbered if numbered backups exist, simple otherwise simple, never always make simple backups Using -s ignores -L and -P. Otherwise, the last option specified controls behavior when a TARGET is a symbolic link, defaulting to -P."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "link",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/link/2/json"
            },
            {
                "name": "symlink",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/symlink/2/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 12,
                "subsections": [
                    {
                        "name": "-b --backup",
                        "lines": 1,
                        "flag": "-b",
                        "long": "--backup"
                    },
                    {
                        "name": "-d -F --directory",
                        "lines": 3,
                        "flag": "-F",
                        "long": "--directory"
                    },
                    {
                        "name": "-f --force",
                        "lines": 2,
                        "flag": "-f",
                        "long": "--force"
                    },
                    {
                        "name": "-i --interactive",
                        "lines": 2,
                        "flag": "-i",
                        "long": "--interactive"
                    },
                    {
                        "name": "-L --logical",
                        "lines": 2,
                        "flag": "-L",
                        "long": "--logical"
                    },
                    {
                        "name": "-n --no-dereference",
                        "lines": 2,
                        "flag": "-n",
                        "long": "--no-dereference"
                    },
                    {
                        "name": "-P --physical",
                        "lines": 2,
                        "flag": "-P",
                        "long": "--physical"
                    },
                    {
                        "name": "-r --relative",
                        "lines": 2,
                        "flag": "-r",
                        "long": "--relative"
                    },
                    {
                        "name": "-s --symbolic",
                        "lines": 2,
                        "flag": "-s",
                        "long": "--symbolic"
                    },
                    {
                        "name": "-S --suffix",
                        "lines": 2,
                        "flag": "-S",
                        "long": "--suffix"
                    },
                    {
                        "name": "-t --target-directory",
                        "lines": 2,
                        "flag": "-t",
                        "long": "--target-directory"
                    },
                    {
                        "name": "-T --no-target-directory",
                        "lines": 2,
                        "flag": "-T",
                        "long": "--no-target-directory"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 4,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "--version",
                        "lines": 21,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 8,
                "subsections": []
            }
        ]
    }
}