icon Top 9 categories map      RocketAware >


Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.

The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Search all pages


By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Integer, Floating point, Matrix, Statistics, Boolean, ...

Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...


RocketLink!--> Man page versions: OpenBSD

LNDIR(1)                   OpenBSD Reference Manual                   LNDIR(1)

     lndir - create a shadow directory of symbolic links to another

     lndir [-e exceptfile] [-s] [-i] [fromdir] [todir]

     The lndir program makes a shadow copy todir of a directory tree fromdir,
     except that the shadow is not populated with real files but instead with
     symbolic links pointing at the real files in the fromdir directory tree.
     This is usually useful for maintaining source code for different machine
     architectures.  You create a shadow directory containing links to the re-
     al source, which you will have usually mounted from a remote machine.
     You can build in the shadow tree, and the object files will be in the
     shadow directory, while the source files in the shadow directory are just
     symlinks to the real files.

     This scheme 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 all shadow directories are symlinks to the real thing: just cd to the
     shadow directory and recompile away.

     The todir argument is optional and defaults to the current directory.
     The fromdir argument may be relative (e.g., ../src) and is relative to
     todir (not the current directory).

     Note that RCS, SCCS, CVS and CVS.adm directories are not shadowed, in ad-
     dition to any specified on the command line with -e arguments.

     If you add files, simply run lndir again.  New files will be silently
     added.  Old files will be checked that they have the correct link.

     Deleting files is a more painful problem; the symlinks will just point
     into never never land.

     If a file in fromdir is a symbolic link, lndir will make the same link in
     todir rather than making a link back to the (symbolic link) entry in
     fromdir. The -i flag changes this behavior.

     -e exceptfile   Add the specified file to the list of excluded files/di-
                     rectories.  This is effective in all directories searched
                     by lndir. This option may be specified as many times as

     -s              Suppresses status messages normally output as lndir de-
                     scends into each subdirectory.

     -i              Causes the program to not treat symbolic links in fromdir
                     specially.  The link created in todir will point back to
                     the corresponding (symbolic link) file in fromdir. If the
                     link is to a directory, this is almost certainly the
                     wrong thing.

                     This option exists mostly to emulate the behavior the C
                     version of lndir had in X11R6.  Its use is not recommend-

     The program displays the name of each subdirectory it enters, followed by
     a colon.  The -s option suppresses these messages.

     A warning message is displayed if the symbolic link cannot be created.
     The usual problem is that a regular file of the same name already exists.

     If the link already exists but doesn't point to the correct file, the
     program prints the link name and the location where it does point.

     The patch(1) program gets upset if it cannot change the files.  You
     should never run patch(1) from a shadow directory anyway.

     You need to use something like

           find todir -type l -print | xargs rm

     to clear out all files before you can relink (if fromdir moved, for in-
     stance).  Something like

           find . \! -type d -print

     will find all files that are not directories.

     find(1),  ln(1),  patch(1)

     lndir was first distributed as part of X11.

     This version first appeared in OpenBSD 1.2.

OpenBSD 2.6                      June 21, 1997                               2

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.

(Corrections, notes, and links courtesy of RocketAware.com)

[Detailed Topics]
OpenBSD sources for lndir(1)

[Overview Topics]

Up to: Directory Access - Accessing directories of files, browsing, management, et al.

RocketLink!--> Man page versions: OpenBSD

Rapid-Links: Search | About | Comments | Submit Path: RocketAware > lndir.1/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments