Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ lndir(XS) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


 lndir(XS)         X Version 11 (Release 5) 6 January 1993          lndir(XS)


 Name

    lndir - create a shadow directory of symbolic links to another directory
    tree

 Syntax


    lndir  fromdir  [todir]


 Description

    lndir 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 archi-
    tectures.  You create a shadow directory containing links to the real
    source which you will have usually NFS mounted from a machine of a dif-
    ferent 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.

    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 sha-
    dow directory and recompile away.

    The todir argument is optional and defaults to the current directory.
    The fromdir argument may be relative (for example, ../src) and is rela-
    tive to todir (not the current directory).

    _________________________________________________________________________
       NOTE  RCS and SCCS directories are not shadowed.
    _________________________________________________________________________

    Note that if you add files, you must run lndir again.  Deleting files is
    a more painful problem; the symlinks will just point into never never
    land.

 Known limitations

    patch gets upset if it cannot change the files.  You should never run
    patch 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
    instance).  Something like

       find  .  \!  -type  d  -print

    will find all files that are not directories.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026