File: lndir.man

package info (click to toggle)
cssc 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 11,368 kB
  • sloc: cpp: 39,446; ansic: 17,403; sh: 11,328; python: 3,923; makefile: 1,929; perl: 342; awk: 15; sed: 15
file content (88 lines) | stat: -rw-r--r-- 3,408 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
.\" Copyright (c) 1993, 1994  X Consortium
.\" Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
.\" 2008, 2009, 2010, 2001, 2014, 2019 Free Software Foundation, Inc.
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining a
.\" copy of this software and associated documentation files (the "Software"),
.\" to deal in the Software without restriction, including without limitation
.\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
.\" and/or sell copies of the Software, and to permit persons to whom the
.\" Software furnished to do so, subject to the following conditions:
.\"
.\" The above copyright notice and this permission notice shall be included in
.\" all copies or substantial portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
.\" THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
.\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
.\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
.\" SOFTWARE.
.\"
.\" Except as contained in this notice, the name of the X Consortium shall not
.\" be used in advertising or otherwise to promote the sale, use or other
.\" dealing in this Software without prior written authorization from the
.\" X Consortium.
.TH LNDIR 1 "Release 6" "X Version 11"
.SH NAME
lndir \- create a shadow directory of symbolic links to another directory tree
.SH SYNOPSIS
.B lndir
fromdir [todir]
.SH DESCRIPTION
.I Lndir
makes a shadow copy
.I todir
of a directory tree
.I fromdir,
except that the shadow is not
populated with real files but instead with symbolic links pointing at
the real files in the
.I fromdir
directory tree.  This is usually useful for maintaining source code for
different machine architectures.  You create a shadow directory
containing links to the real source which you will have usually NFS
mounted from a machine of a different architecture, and then recompile
it.  The object files will be in the shadow directory, while the
source files in the shadow directory are just symlinks to the real
files.
.PP
This has the advantage that if you update the source, you need not
propagate the change to the other architectures by hand, since all
source in shadow directories are symlinks to the real thing: just cd
to the shadow directory and recompile away.
.PP
The
.I todir
argument is optional and defaults to the current directory.  The
.I fromdir
argument may be relative (e.g., ../src) and is relative to
.I todir
(not the current directory).
.PP
.ft B
.\" CVS.adm is used by the Concurrent Versions System.
Note that RCS, SCCS, and CVS.adm directories are not shadowed.
.ft
.PP
If you add files, simply run
.I lndir
again.  Deleting files is a more painful problem; the symlinks will
just point into never never land.
.SH BUGS
.I Patch
gets upset if it cannot change the files.  You should never run
.I patch
from a shadow directory anyway.
.PP
You need to use something like
.nf
	find todir \-type l \-print | xargs rm
.fi
to clear out all files before you can relink (if fromdir moved, for instance).
Something like
.nf
	 find . \\! \-type d \-print
.fi
will find all files that are not directories.