1LN(1) User Commands LN(1)
2
3
4
6 ln - make links between files
7
9 ln [OPTION]... [-T] TARGET LINK_NAME (1st form)
10 ln [OPTION]... TARGET (2nd form)
11 ln [OPTION]... TARGET... DIRECTORY (3rd form)
12 ln [OPTION]... -t DIRECTORY TARGET... (4th form)
13
15 In the 1st form, create a link to TARGET with the name LINK_NAME. In
16 the 2nd form, create a link to TARGET in the current directory. In the
17 3rd and 4th forms, create links to each TARGET in DIRECTORY. Create
18 hard links by default, symbolic links with --symbolic. By default,
19 each destination (name of new link) should not already exist. When
20 creating hard links, each TARGET must exist. Symbolic links can hold
21 arbitrary text; if later resolved, a relative link is interpreted in
22 relation to its parent directory.
23
24 Mandatory arguments to long options are mandatory for short options
25 too.
26
27 --backup[=CONTROL]
28 make a backup of each existing destination file
29
30 -b like --backup but does not accept an argument
31
32 -d, -F, --directory
33 allow the superuser to attempt to hard link directories (note:
34 will probably fail due to system restrictions, even for the
35 superuser)
36
37 -f, --force
38 remove existing destination files
39
40 -i, --interactive
41 prompt whether to remove destinations
42
43 -L, --logical
44 dereference TARGETs that are symbolic links
45
46 -n, --no-dereference
47 treat LINK_NAME as a normal file if it is a symbolic link to a
48 directory
49
50 -P, --physical
51 make hard links directly to symbolic links
52
53 -r, --relative
54 create symbolic links relative to link location
55
56 -s, --symbolic
57 make symbolic links instead of hard links
58
59 -S, --suffix=SUFFIX
60 override the usual backup suffix
61
62 -t, --target-directory=DIRECTORY
63 specify the DIRECTORY in which to create the links
64
65 -T, --no-target-directory
66 treat LINK_NAME as a normal file always
67
68 -v, --verbose
69 print name of each linked file
70
71 --help display this help and exit
72
73 --version
74 output version information and exit
75
76 The backup suffix is '~', unless set with --suffix or SIM‐
77 PLE_BACKUP_SUFFIX. The version control method may be selected via the
78 --backup option or through the VERSION_CONTROL environment variable.
79 Here are the values:
80
81 none, off
82 never make backups (even if --backup is given)
83
84 numbered, t
85 make numbered backups
86
87 existing, nil
88 numbered if numbered backups exist, simple otherwise
89
90 simple, never
91 always make simple backups
92
93 Using -s ignores -L and -P. Otherwise, the last option specified con‐
94 trols behavior when a TARGET is a symbolic link, defaulting to -P.
95
96 GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
97 Report ln translation bugs to <http://translationproject.org/team/>
98
100 Written by Mike Parker and David MacKenzie.
101
103 Copyright © 2013 Free Software Foundation, Inc. License GPLv3+: GNU
104 GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
105 This is free software: you are free to change and redistribute it.
106 There is NO WARRANTY, to the extent permitted by law.
107
109 link(2), symlink(2)
110
111 The full documentation for ln is maintained as a Texinfo manual. If
112 the info and ln programs are properly installed at your site, the com‐
113 mand
114
115 info coreutils 'ln invocation'
116
117 should give you access to the complete manual.
118
119
120
121GNU coreutils 8.22 October 2018 LN(1)