LNDIR(1) AIX LNDIR(1) NAME lndir - create a shadow directory of symbolic links to another directory tree SYNOPSIS llllnnnnddddiiiirrrr fromdir [todir] DESCRIPTION _L_n_d_i_r makes a shadow copy _t_o_d_i_r of a directory tree _f_r_o_m_d_i_r, except that the shadow is not populated with real files but instead with symbolic links pointing at the real files in the _f_r_o_m_d_i_r 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. 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 recom- pile away. The _t_o_d_i_r argument is optional and defaults to the current directory. The _f_r_o_m_d_i_r argument may be relative (e.g., ../src) and is relative to _t_o_d_i_r (not the current direc- tory). NNNNooootttteeee tttthhhhaaaatttt RRRRCCCCSSSS aaaannnndddd SSSSCCCCCCCCSSSS ddddiiiirrrreeeeccccttttoooorrrriiiieeeessss aaaarrrreeee nnnnooootttt sssshhhhaaaaddddoooowwwweeeedddd.... Note that if you add files, you must run _l_n_d_i_r again. Deleting files is a more painful problem; the symlinks will just point into never never land. BUGS _P_a_t_c_h gets upset if it cannot change the files. You should never run _p_a_t_c_h 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. Rev. Release 5 Page 1