# 使用 Homebrew, MacPorts, winget 安装 watch

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

## 安装

```sh
sudo av install brew:watch
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install watch
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install watch
```

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

### Windows

- winget (92%):

```sh
winget install --id 54145a.145watch -e
```

  证据: Windows Package Manager source index: 54145a.145watch from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:watch
- **软件包管理器:** Homebrew
- **版本:** 4.0.6
- **来源摘要:** Executes a program periodically, showing output fullscreen
- **主页:** <https://gitlab.com/procps-ng/procps>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- watch (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

watch is the small terminal utility that reruns a command at an interval and redraws the first screenful of output. In practice it is a Unix operator's ad-hoc dashboard: useful for repeatedly inspecting process state, kernel values, logs, queues, counters, or any shell pipeline whose output changes over time.

### 项目历史

The current procps-ng source keeps a compact lineage in the watch source header: it is based on Tony Rems's original 1991 watch, with later modifications by Francois Pinard; Mike Coleman, Albert Cahalan, Morty Abzug, Jarrod Lowe, Sami Kerola, Jim Warner, Craig Small, and Roman Zilka appear in the copyright and feature history. That lineage explains why a tiny command has accumulated practical terminal behavior over decades rather than becoming a new standalone project.

watch is maintained today as part of procps/procps-ng, the Linux /proc-oriented utility collection that also includes ps, top, free, vmstat, pgrep, pkill, uptime, w, and related tools. The procps-ng NEWS file records the 3.3.0 fork by Debian, Fedora, and openSUSE maintainers from procps, followed by steady watch-specific work such as Unicode and ANSI color handling, no-wrap mode, precise intervals, no-rerun-on-resize, equal-output exit behavior, 256-color support, and the more recent follow mode.

### 使用方式

The standard manual describes watch as running a command repeatedly, defaulting to a two-second interval, until interrupted. Its core options cover interval control, highlighting differences between refreshes, exiting when output changes or stabilizes, treating the command as exec rather than shell text, preserving or suppressing the title header, interpreting color, and reacting to non-zero command exits.

Typical package-nerd use is not limited to process monitoring. Users wrap arbitrary shell fragments: `watch -d ls -l`, `watch uname -r`, a pipeline over `/proc/cpuinfo`, a ping loop, a queue-depth check, or a package-build directory listing. Because the command is usually passed through `sh -c`, watch composes naturally with shell quoting, pipes, redirects, and text filters.

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

watch matters because it is the minimal repeat loop with terminal ergonomics. It occupies the space between a one-off command and writing a monitoring script: no daemon, no UI framework, no config, just a refresh interval, a screen, and a shell command. That makes it a fixture in build troubleshooting, service bring-up, kernel and container debugging, and package maintainer workflows where quick visual feedback beats a permanent monitoring stack.

### 时间线

- 1991: Original watch by Tony Rems, later noted in the procps-ng source header.
- 1999-2009: Later source-header credits record Mike Coleman work, Morty Abzug's stderr/exec/beep additions, and Jarrod Lowe's Unicode support.
- 2011: procps-ng 3.3.0 is described in NEWS as the Debian, Fedora, and openSUSE fork of procps.
- 2014-2026: procps-ng NEWS shows continuing watch maintenance, including interval, Unicode, ANSI/color, resize, line wrapping, and output-change behavior.
- 2025: The man-pages copy of watch(1) documents modern options such as --follow, --equexit, --precise, --exec, and WATCH_INTERVAL.

### Related projects

- watch is related to procps/procps-ng tools such as ps, top, vmstat, uptime, w, pgrep, and free; to shell loops such as `while true; do ...; sleep ...; done`; and to file/event-oriented rerun tools such as entr, watchexec, and Watchman, though watch itself is polling command output rather than subscribing to file changes.

### 来源

- <https://gitlab.com/procps-ng/procps/-/raw/master/NEWS>
- <https://gitlab.com/procps-ng/procps/-/raw/master/README.md>
- <https://gitlab.com/procps-ng/procps/-/raw/master/src/watch.c>
- <https://man7.org/linux/man-pages/man1/watch.1.html>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- MacPorts - watch: normalized package name match | MacPorts ports tree: sysutils/watch/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- winget - 54145a.145watch: normalized package name match | Windows Package Manager source index: 54145a.145watch from https://cdn.winget.microsoft.com/cache/source.msix
- winget - Japplis.Watch: normalized package name match | Windows Package Manager source index: Japplis.Watch from https://cdn.winget.microsoft.com/cache/source.msix
- winget - echocat.watch: normalized package name match | Windows Package Manager source index: echocat.watch from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

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