There are times when it is handy to know how to create shadow directory of symbolic links.
I am thinking in particular of the software compilation process, as I have used this technique in very distant past to build X Window System.

The required application is available in X Window System source code as lndir utility.

Installation process

The easiest way to obtain it is to install xutils-dev package.

$ sudo apt-get install xutils-dev

Alternatively you can download package source code, build required dependencies and compile only this utility.


Provide only source directory to create shadow directory in current work directory.

$ mkdir ags_build
$ cd ags_build
ags_build$ lndir ../ags

Provide both source and destination directories to create shadow directory in provided location.

$ lndir /home/milosz/Projekty/ags /home/milosz/Projekty/ags_build/

It will recursively recreate directories and populate them with symbolic links pointing at the real files .

Additional notes