# 使用 Homebrew, apt, MacPorts, Nix 安装 afio

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

## 安装

```sh
sudo av install brew:afio
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install afio
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install afio
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install afio
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#afio
```

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

## 软件包事实

- **软件包键:** brew:afio
- **软件包管理器:** Homebrew
- **版本:** 2.5.2
- **来源摘要:** Creates cpio-format archives
- **主页:** <https://github.com/kholtman/afio>
- **仓库:** <https://github.com/kholtman/afio>
- **最后更新:** 2026-07-02T11:12:14-04:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- afio (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

afio is a cpio-format archive tool aimed especially at backup scripts. The official README says it handles input corruption somewhat gracefully, supports interactive multi-volume archives, and can make compressed archives safer than compressed tar or cpio archives.

### 项目历史

The official README says afio is one of the oldest open-source projects around, started in 1985, and is now in maintenance-only mode. Its HISTORY file preserves older context, including Mark Brukhartz/Lachman Associates-era README material describing afio as a better way to deal with cpio-format archives, faster than cpio, more diverse for magnetic tape options, and more graceful with input corruption.

The Linux line of afio passed through Dave Gymer's port, Andrew Stevens' cleanup work, and Koen Holtman's maintenance beginning around version 2.3.5 for Linux. The HISTORY file records additions such as gzip-aware compression handling, backup scripts, new options, verification improvements, and many portability and hard-link fixes through the 2.4 series.

The current maintainer's 2018 note in the README explains the modern maintenance policy: bug fixes, portability fixes, and security fixes are welcome, but major new features are unlikely because the maintainer prioritizes avoiding silent backup failures and because cheap hard drives made afio's old floppy/tape-oriented strengths less central for average Linux users.

### 采用历史

afio's adoption sits in traditional Unix backup culture: scripts feed pathnames into afio, and afio writes cpio-format archives to files, pipes, tape devices, or multi-volume media. The supplied package-manager facts list Homebrew, Debian, Ubuntu, MacPorts, and Nix, showing that distributions still carry it for compatibility and existing backup workflows.

The README explicitly warns new users not to start using afio if they have never used it as an archive engine before, but also states that existing users can expect compatibility work for Unix time_t extensions before 2038. That is a rare official statement of legacy maintenance rather than growth.

### 使用方式

The manpage documents five core modes: -o to create an archive from pathnames on standard input, -i to unpack, -t to list contents, -r to verify an archive against the filesystem, and -p to copy files to directories.

A key usage difference from tar -z style archives is that afio compresses individual files inside the archive rather than the whole archive datastream. The manpage and README both emphasize that this makes compressed afio archives more robust after corruption.

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

afio is package-nerd history in executable form: cpio archives, tape/floppy multi-volume workflows, gzip-per-file compression, remote archive names, and backup-script integration all survived into a maintained GitHub repository.

Its README is unusually honest about maintenance economics and bit-rot risk. That makes the package valuable not only as a tool, but as a case study in how old Unix utilities age: keep compatibility, fix security and portability issues, avoid new backup-destroying surprises.

### 时间线

- 1985: Official README says afio started.
- 2.3.5: HISTORY records Koen Holtman's Linux maintenance line beginning around this version.
- 2.4.8beta1: README says support for files greater than 2 GB began.
- 2018: Maintainer note describes maintenance-only mode.
- 2.5.2: Current README version with security, multivolume naming, bug, and portability fixes.

### Related projects

- Related projects and concepts include cpio, tar, gzip, magnetic tape backup, floppy backup, rsync, Unix backup scripts, and year-2038 time_t compatibility work.

### 来源

- <https://github.com/kholtman/afio/blob/master/HISTORY>
- <https://github.com/kholtman/afio/blob/master/README>
- <https://github.com/kholtman/afio/blob/master/afio.1>
- source_facts.package-manager
- source_facts.repo


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

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

- Debian apt - afio - 2.5.2-3+b1: normalized package name match | Debian stable package indexes: afio from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | archive file manipulation program | https://github.com/kholtman/afio
- Nix - afio: normalized package name match | nixpkgs package indexes: pkgs/by-name/af/afio/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - afio - 2.5.2-3: normalized package name match | Ubuntu 24.04 LTS package indexes: afio from https://archive.ubuntu.com/ubuntu/dists/noble/multiverse/binary-amd64/Packages.gz | archive file manipulation program | https://github.com/kholtman/afio
- MacPorts - afio: normalized package name match | MacPorts ports tree: archivers/afio/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/afio.yml](https://github.com/mxcl/pkgdb/blob/main/combined/afio.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
