# 使用 Homebrew, apt, Nix 安装 lr

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

## 安装

```sh
sudo av install brew:lr
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install lr
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install lr
```

  证据: Debian stable package indexes: lr from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#lr
```

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

## 软件包事实

- **软件包键:** brew:lr
- **软件包管理器:** Homebrew
- **版本:** 2.0.1
- **来源摘要:** File list utility with features from ls(1), find(1), stat(1), and du(1)
- **主页:** <https://github.com/leahneukirchen/lr>
- **仓库:** <https://github.com/leahneukirchen/lr>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- lr (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

lr is a recursive file-listing command that combines parts of `ls`, `find`, `stat`, and `du` into one Unix-style CLI.

### 项目历史

Leah Neukirchen's GitHub repository describes lr as a tool for generating file listings with selected features from `ls(1)`, `find(1)`, `stat(1)`, and `du(1)`. The repository was created in October 2015 and the first tagged release, v0.1, followed in November 2015.

The NEWS file shows the tool maturing through Unix-flavored features: chmod-style mode checks, timestamp selection, colorized symlink targets, broken-link display, Linux ACL/capability/xattr display, breadth-first traversal, shell quoting, OSC 8 hyperlinks, and permission-error behavior.

### 采用历史

The supplied package-manager facts list Homebrew, Debian, Ubuntu, and Nix packaging. That spread fits lr's niche: it is not a coreutils replacement, but it appeals to users who want recursive listings and filter expressions without assembling long `find` pipelines.

GitHub metadata shows a modest but real audience, with 165 stars and ongoing repository activity through 2025.

### 使用方式

lr is run directly as `lr` over one or more paths. The README includes a 'Rosetta stone' mapping common `ls` and `find` invocations to lr commands, and documents filters, sort keys, custom formats, depth control, symlink handling, NUL-delimited input/output, and long-output formats.

The tool has no documented config file or credentials; behavior is controlled through command-line flags and filter expressions.

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

lr is interesting to package nerds because it sits between canonical Unix tools rather than replacing only one of them. It packages a personal Unix workflow into a small C utility with manpage-style semantics, making it attractive to people who care about composable file enumeration.

### 时间线

- 2015: GitHub repository created and v0.1 tagged.
- 2017: v1.0 changed quoting behavior and added locale, color, @file input, and better error reporting.
- 2023: v1.6 added basename sorting and large-file defaults.
- 2025: v2.0 changed permission-denied behavior and added quiet mode.

### Related projects

- lr overlaps with `ls`, `find`, `stat`, `du`, `xargs`, and the author's `xe` utility, which the README recommends for command execution workflows.

### 来源

- <https://api.github.com/repos/leahneukirchen/lr>
- <https://api.github.com/repos/leahneukirchen/lr/git/ref/tags/v0.1>
- <https://github.com/leahneukirchen/lr>
- <https://raw.githubusercontent.com/leahneukirchen/lr/master/NEWS.md>
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - lr - 1.5.1-3: normalized package name match | Debian stable package indexes: lr from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | list files, recursively | https://git.vuxu.org/lr/about/
- Nix - lr: normalized package name match | nixpkgs package indexes: pkgs/by-name/lr/lr/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - lr - 1.5.1-3: normalized package name match | Ubuntu 24.04 LTS package indexes: lr from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | list files, recursively | https://git.vuxu.org/lr/about/


## Combined YAML source

View the package source record on GitHub. [combined/lr.yml](https://github.com/mxcl/pkgdb/blob/main/combined/lr.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
