lndir.man 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. .\" $XConsortium: lndir.man /main/2 1995/07/17 10:49:35 drk $
  2. .TH LNDIR 1 "Release 5" "X Version 11"
  3. .SH NAME
  4. lndir \- create a shadow directory of symbolic links to another directory tree
  5. .SH SYNOPSIS
  6. .B lndir
  7. fromdir [todir]
  8. .SH DESCRIPTION
  9. .I Lndir
  10. makes a shadow copy
  11. .I todir
  12. of a directory tree
  13. .I fromdir,
  14. except that the shadow is not
  15. populated with real files but instead with symbolic links pointing at
  16. the real files in the
  17. .I fromdir
  18. directory tree. This is usually useful for maintaining source code for
  19. different machine architectures. You create a shadow directory
  20. containing links to the real source which you will have usually NFS
  21. mounted from a machine of a different architecture, and then recompile
  22. it. The object files will be in the shadow directory, while the
  23. source files in the shadow directory are just symlinks to the real
  24. files.
  25. .PP
  26. This has the advantage that if you update the source, you need not
  27. propagate the change to the other architectures by hand, since all
  28. source in shadow directories are symlinks to the real thing: just cd
  29. to the shadow directory and recompile away.
  30. .PP
  31. The
  32. .I todir
  33. argument is optional and defaults to the current directory. The
  34. .I fromdir
  35. argument may be relative (e.g., ../src) and is relative to
  36. .I todir
  37. (not the current directory).
  38. .PP
  39. .ft B
  40. Note that RCS and SCCS directories are not shadowed.
  41. .ft
  42. .PP
  43. Note that if you add files, you must run
  44. .I lndir
  45. again. Deleting files is a more painful problem; the symlinks will
  46. just point into never never land.
  47. .SH BUGS
  48. .I Patch
  49. gets upset if it cannot change the files. You should never run
  50. .I patch
  51. from a shadow directory anyway.
  52. .PP
  53. You need to use something like
  54. .nf
  55. find todir -type l -print | xargs rm
  56. .fi
  57. to clear out all files before you can relink (if fromdir moved, for instance).
  58. Something like
  59. .nf
  60. find . \\! -type d -print
  61. .fi
  62. will find all files that are not directories.