Monitoring

watch – small command-line utility written in C

watch is a small command-line utility written in C that periodically runs a shell command at a user-defined interval.

It’s aimed at lightweight automation tasks such as rerunning tests, rebuilding assets, and repeatedly checking command output. The project is similar to the traditional watch(1) utility, but it adds millisecond interval support, preserves ANSI escape sequences, and does not clear the terminal unless explicitly asked to do so.

This is free and open source software.

Key Features

  • Executes commands repeatedly at configurable intervals, including millisecond values.
  • Supports quiet mode to display only stderr output.
  • Can halt execution when a command fails.
  • Optionally clears the screen between iterations.

Website: github.com/tj/watch
Support:
Developer: TJ
License: MIT License

watch help

watch is written in C. Learn C with our recommended free books and free tutorials.


Related Software

watch alternatives
viddyModern watch command. It features in our Top 100 TUI apps
hwatchResults are scrollable and displayed. Also features in our Top 100 TUI apps
watchexecRun a command when files in the current directory change
neowatchAlternative to watch also written in Rust
ovFeature rich terminal pager
chokidarWatch file system changes
watcherWatch files in a directory for changes
wfhRsync as you edit
reflexRun a command when files change
rwatchRust implementation of watch

Best Free and Open Source Software Explore our carefully curated directory of recommended free and open source software, covering every major software category.

The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more.

Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted