|
|
1.1 root 1: .TH LN 1 "17 March 1982"
2: .UC 4
3: .SH NAME
4: ln \- make links
5: .SH SYNOPSIS
6: .B ln
7: [
8: .B \-s
9: ]
10: name1 [ name2 ]
11: .br
12: .B ln
13: name ... directory
14: .SH DESCRIPTION
15: A link is a directory entry referring
16: to a file; the same file (together with
17: its size, all its protection
18: information, etc.)
19: may have several links to it.
20: There are two kinds of links: hard links and symbolic links.
21: .PP
22: By default
23: .I ln
24: makes hard links.
25: A hard link to a file is indistinguishable from the
26: original directory entry; any changes to a
27: file are effective independent of the name used
28: to reference the file.
29: Hard links may not span file systems and may not refer to directories.
30: .PP
31: The
32: .B \-s
33: option causes
34: .I ln
35: to create symbolic links.
36: A symbolic link contains the name of the file to
37: which it is linked. The referenced file is used when an
38: .IR open (2)
39: operation is performed on the link.
40: A
41: .IR stat (2)
42: on a symbolic link will return the linked-to file; an
43: .IR lstat (2)
44: must be done to obtain information about the link.
45: The
46: .IR readlink (2)
47: call may be used to read the contents of a symbolic link.
48: Symbolic links may span file systems and may refer to directories.
49: .PP
50: Given one or two arguments,
51: .I ln
52: creates a link to an existing file
53: .IR name1 .
54: If
55: .I name2
56: is given, the link has that name;
57: .I name2
58: may also be a directory in which to place the link;
59: otherwise it is placed in the current directory.
60: If only the directory is specified, the link will be made
61: to the last component of
62: .IR name1 .
63: .PP
64: Given more than two arguments,
65: .I ln
66: makes links to all the named files in the named directory.
67: The links made will have the same name as the files being linked to.
68: .SH "SEE ALSO"
69: rm(1), cp(1), mv(1), link(2), readlink(2), stat(2), symlink(2)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.