]> git.sesse.net Git - rdpsrv/blob - Xserver/config/util/lndir.man
Import X server from vnc-3.3.7.
[rdpsrv] / Xserver / config / util / lndir.man
1 .\" $XConsortium: lndir.man /main/10 1996/09/28 16:16:45 rws $
2 .\"
3 .\" Copyright (c) 1993, 1994  X Consortium
4 .\" 
5 .\" Permission is hereby granted, free of charge, to any person obtaining
6 .\" a copy of this software and associated documentation files (the
7 .\" "Software"), to deal in the Software without restriction, including
8 .\" without limitation the rights to use, copy, modify, merge, publish,
9 .\" distribute, sublicense, and/or sell copies of the Software, and to
10 .\" permit persons to whom the Software is furnished to do so, subject to
11 .\" the following conditions:
12 .\" 
13 .\" The above copyright notice and this permission notice shall be
14 .\" included in all copies or substantial portions of the Software.
15 .\" 
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 .\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 .\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 .\" OTHER DEALINGS IN THE SOFTWARE.
23 .\" 
24 .\" Except as contained in this notice, the name of the X Consortium shall
25 .\" not be used in advertising or otherwise to promote the sale, use or
26 .\" other dealings in this Software without prior written authorization
27 .\" from the X Consortium.
28 .\" 
29 .TH LNDIR 1 "Release 6.1" "X Version 11"
30 .SH NAME
31 lndir \- create a shadow directory of symbolic links to another directory tree
32 .SH SYNOPSIS
33 .B lndir
34 [
35 .B \-silent
36 ] [
37 .B \-ignorelinks
38 ]
39 .I \|fromdir\|
40 [
41 .I todir
42 ]
43 .SH DESCRIPTION
44 The
45 .I lndir
46 program makes a shadow copy 
47 .I todir 
48 of a directory tree
49 .I fromdir, 
50 except that the shadow is not
51 populated with real files but instead with symbolic links pointing at
52 the real files in the 
53 .I fromdir
54 directory tree.  This is usually useful for maintaining source code for
55 different machine architectures.  You create a shadow directory
56 containing links to the real source, which you will have usually
57 mounted from a remote machine.  You can build in the shadow tree, and
58 the object files will be in the shadow directory, while the
59 source files in the shadow directory are just symlinks to the real
60 files.
61 .PP
62 This scheme has the advantage that if you update the source, you need not 
63 propagate the change to the other architectures by hand, since all
64 source in all shadow directories are symlinks to the real thing: just cd
65 to the shadow directory and recompile away.
66 .PP
67 The
68 .I todir
69 argument is optional and defaults to the current directory.  The
70 .I fromdir
71 argument may be relative (e.g., ../src) and is relative to
72 .I todir
73 (not the current directory).
74 .PP 
75 .\" CVS.adm is used by the Concurrent Versions System.
76 Note that RCS, SCCS, CVS and CVS.adm directories are not shadowed.
77 .PP
78 If you add files, simply run
79 .I lndir
80 again.  New files will be silently added.  Old files will be
81 checked that they have the correct link.
82 .PP
83 Deleting files is a more painful problem; the symlinks will
84 just point into never never land.
85 .PP
86 If a file in \fIfromdir\fP is a symbolic link, \fIlndir\fP will make
87 the same link in \fItodir\fP rather than making a link back to the
88 (symbolic link) entry in \fIfromdir.\fP  The \fB\-ignorelinks\fP flag
89 changes this behavior.
90 .SH OPTIONS
91 .IP \-silent
92 Normally \fIlndir\fP outputs the name of each subdirectory as it
93 descends into it.  The \fB\-silent\fP option suppresses these status
94 messages.
95 .IP \-ignorelinks
96 Causes the program to not treat symbolic links in \fIfromdir\fP
97 specially.  The link created in \fItodir\fP will point back to the
98 corresponding (symbolic link) file in \fIfromdir\fP.
99 If the link is to a directory, this is almost certainly the wrong thing.
100 .IP
101 This option exists mostly to emulate the behavior the C version of
102 \fIlndir\fP had in X11R6.  Its use is not recommended.
103 .SH DIAGNOSTICS
104 The program displays the name of each subdirectory it enters, followed
105 by a colon.  The \fB\-silent\fP option suppresses these messages.
106 .PP
107 A warning message is displayed if the symbolic link cannot be created.
108 The usual problem is that a regular file of the same name already
109 exists.
110 .PP
111 If the link already exists but doesn't point to the correct file, the
112 program prints the link name and the location where it does point.
113 .SH BUGS
114 The
115 .I patch
116 program gets upset if it cannot change the files.  You should never run
117 .I patch
118 from a shadow directory anyway.
119 .PP
120 You need to use something like
121 .nf
122         find todir \|\-type l \|\-print \||\| xargs rm
123 .fi
124 to clear out all files before you can relink (if fromdir moved, for instance).
125 Something like
126 .nf
127          find . \|\\! \|\-type d \|\-print
128 .fi
129 will find all files that are not directories.