# 使用 Homebrew, MacPorts, Nix, zypper, dnf 安装 lndir

查看 lndir 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:lndir
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install lndir
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install lndir
```

  证据: MacPorts ports tree: x11/lndir/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#lndir
```

  证据: nixpkgs package indexes: pkgs/by-name/ln/lndir/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install lndir
```

  证据: openSUSE Tumbleweed package metadata: lndir from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

- dnf (92%):

```sh
sudo dnf install imake
```

  证据: Fedora Rawhide package metadata: imake from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

## 软件包事实

- **软件包键:** brew:lndir
- **软件包管理器:** Homebrew
- **版本:** 1.0.5
- **来源摘要:** Create a shadow directory of symbolic links to another directory tree
- **主页:** <https://gitlab.freedesktop.org/xorg/util/lndir>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- lndir (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.0.5
## 项目历史与用法

lndir is an X.Org utility that creates a shadow directory tree made of symbolic links to another source tree. It is a small build-support tool from the X11/X.Org world, historically useful when building the same source checkout for multiple machines or configurations.

### 项目历史

The official manual describes lndir as a program that makes a shadow copy of a directory tree, where files are symbolic links back to the original source tree. X.Org build documentation for X11R6.8 recommended this shadow-tree workflow to keep source directories unmodified and support builds for different operating systems or architectures.

In the modular X.Org tree, lndir lives under util/lndir. X.Org's module guidelines describe the util module as a home for modular-tree build tools and legacy build tools from the monolithic tree, with lndir listed alongside utilities such as imake, gccmakedep, and makedepend.

### 采用历史

lndir's adoption is mostly historical and specialist: it mattered to X11 and X.Org builders, distro maintainers, and developers who wanted out-of-tree builds before modern build systems made that workflow routine. Its standalone packaging in Homebrew and other systems preserves that utility without requiring the larger imake package.

The X.Org release directory shows lndir split out as an individual util tarball beginning in the modular release era, with releases from 1.0.1 in 2006 through 1.0.5 in 2024. The freedesktop cgit mirror shows the active upstream mirror and recent maintenance commits.

### 使用方式

A user creates an empty build directory and runs lndir against the source tree. The result is a parallel directory tree where source files are links and generated objects can live separately. Re-running lndir adds new links and checks existing ones, but deleted source files can leave stale symlinks that may need cleanlinks or a fresh shadow tree.

The tool has no project-level configuration or credentials. Its behavior is driven by command-line options such as -silent, -ignorelinks, and -withrevinfo.

### 为什么软件包爱好者会关心

lndir is interesting precisely because it is small and archaic in a useful way. It is a fossil from the X11 build culture that still does one filesystem job cleanly, and package managers keep it available for scripts and users that remember the shadow-directory workflow.

For package nerds, lndir also illustrates the X.Org modularization story: pieces that once lived inside a monolithic source tree became tiny independently released tarballs with their own version streams.

### 时间线

- X11R6 era: lndir is documented as part of X source-tree build workflows.
- 2004: X11R6.8 documentation recommends lndir-based shadow build trees.
- 2006: X.Org publishes lndir 1.0.1 as an individual util release.
- 2024: X.Org publishes lndir 1.0.5.
- 2025: freedesktop cgit mirror shows recent maintenance commits for options and manual-page edits.

### Related projects

- X.Org util modules such as imake, makedepend, gccmakedep, and util-macros belong to the same historical build-tool family.
- cleanlinks is commonly mentioned with lndir because it removes stale symbolic links in shadow trees.
- Modern out-of-tree build systems such as CMake and Meson solve related build-directory separation problems without symlink forests.

### 来源

- <https://cgit.freedesktop.org/xorg/util/lndir>
- <https://gitlab.freedesktop.org/xorg/util/lndir>
- <https://www.x.org/NewModuleGuidelines/>
- <https://www.x.org/releases/individual/util/>
- <https://xorg.freedesktop.org/archive/X11R6.7.0/doc/lndir.1.html>
- <https://xorg.freedesktop.org/archive/X11R6.8.0/doc/BUILD3.html>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Nix - lndir: normalized package name match | nixpkgs package indexes: pkgs/by-name/ln/lndir/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- dnf - imake - 1.0.10-9.fc45: normalized package name match | Fedora Rawhide package metadata: imake from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | imake source code configuration and build system | http://www.x.org
- zypper - lndir - 1.0.5-1.8: normalized package name match | openSUSE Tumbleweed package metadata: lndir from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Utility to create a shadow directory of symbolic links to another directory tree | https://xorg.freedesktop.org/
- MacPorts - lndir: normalized package name match | MacPorts ports tree: x11/lndir/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/lndir.yml](https://github.com/mxcl/pkgdb/blob/main/combined/lndir.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
