LNDIR(1)
π LNDIR(1) β shadow-directory slay π
okay so welcome to the General Commands Manual page for lndir β yes, the LNDIR(1) one, bestie. itβs the tool that makes a whole shadow tree where the βfilesβ are actually symlinks, and itβs literally giving mirror-world realness πͺβ¨
πΈ NAME πΈ
lndir β create a shadow directory of symbolic links to another directory tree. ππ«Ά
β¨ SYNOPSIS β¨
lndir [ -silent ] [ -ignorelinks ] [ -withrevinfo ] fromdir [ todir ]
π¦ DESCRIPTION π¦
so lndir makes todir a shadow copy of the directory tree fromdir β except the shadow isnβt populated with real files. instead itβs populated with symbolic links pointing at the real files in the fromdir directory tree. slay. 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βll usually have mounted from a remote machine. then 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. π
the advantage of this scheme? 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). lowkey important, bestie. π
note:BitKeeper,CVS,CVS.adm,.git,.hg,RCS,SCCS, and.svndirectories are shadowed only if the-withrevinfoflag is specified. files with names ending in~are never shadowed. π«
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 -ignorelinks flag changes this behavior. πͺ
π OPTIONS π
-silentβ normallylndiroutputs the name of each subdirectory as it descends into it. this option suppresses those status messages. quiet queen behavior. π€«-ignorelinksβ causes the program to not treat symbolic links infromdirspecially. the link created intodirwill point back to the corresponding (symbolic link) file infromdir. 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 oflndirhad inX11R6. its use is not recommended. π-withrevinfoβ causes any source control manager subdirectories (those namedBitKeeper,CVS,CVS.adm,.git,.hg,RCS,SCCS, or.svn) to be treated as any other directory, rather than ignored. π
π DIAGNOSTICS π
the program displays the name of each subdirectory it enters, followed by a colon. the -silent 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. π΅οΈββοΈ
π SEE ALSO π
ln(1). go give it a lil read, bestie. π
final sign-off vibes: X Version 11 and lndir 1.0.5 on the LNDIR(1) page π«Άβ¨ the footer didnβt give a date, so weβre not making one up β periodt. π
π¦ where this page comes from
- arch rolling: imake 1.0.11-1 Β· MIT-open-group AND HPND
- nixos 26.05: lndir 1.0.5
- opensuse-leap 16.0: lndir 1.0.5-160000.3.2 Β· MIT
- opensuse-leap 16.0: lndir 1.0.5-160000.3.2 Β· MIT
- opensuse-leap 16.0: lndir 1.0.5-160000.3.2 Β· MIT
- opensuse-leap 16.0: lndir 1.0.5-160000.3.2 Β· MIT
- Copyright (c) 1993, 1994, 1998 The Open Group
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms