← 返回命令列表

Linux command

hwatch 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Watch a command

hwatch [command]

Watch with a custom interval

hwatch -n [5] [command]

Watch with color output

hwatch -c [command]

Watch and highlight differences

hwatch -d [command]

Execute action on output change

hwatch -A "[action_command]" [command]

Output diffs to stdout

hwatch -b [command]

说明

hwatch is a modern alternative to the watch command that records the differences in execution results and allows you to review this history afterward. It provides a TUI with the ability to scroll through previous outputs, search and filter history, and highlight differences between runs. Key features include color mode support, regex filtering of history with / and \* keys, change detection with the -A option (which stores change information as JSON in the HWATCH_DATA environment variable), and the ability to output diffs directly to stdout with -b instead of using the TUI.

FAQ

What is the hwatch command used for?

hwatch is a modern alternative to the watch command that records the differences in execution results and allows you to review this history afterward. It provides a TUI with the ability to scroll through previous outputs, search and filter history, and highlight differences between runs. Key features include color mode support, regex filtering of history with / and \* keys, change detection with the -A option (which stores change information as JSON in the HWATCH_DATA environment variable), and the ability to output diffs directly to stdout with -b instead of using the TUI.

How do I run a basic hwatch example?

Run `hwatch [command]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more hwatch examples?

This page includes 6 examples for hwatch, plus related commands for nearby Linux tasks.