Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to install and use Watchman

📅 2015-Feb-10 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ inotify, watchman ⬩ 📚 Archive

Watchman is a server-client tool to watch files and directories for changes. It uses the inotify mechanism of the Linux kernel to achieve this.

There seems to be no package or PPA of Watchman for Ubuntu. But, installing it from source is easy:

$ git clone https://github.com/facebook/watchman.git
$ cd watchman
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

To ask Watchman to watch a directory for changes:

$ watchman watch /path/to/dir

By default, Watchman writes the changes it notices to its log file. The log file can be found in /tmp/.watchman.yourusername.log.

If you want to uninstall Watchman, go to the source directory and try:

$ sudo make uninstall
( cd '//usr/local/bin' && rm -f watchman )
( cd '//usr/local/share/doc/watchman-3.0.0' && rm -f README.markdown )

Tried with: Watchman 3.0.0 and Ubuntu 14.04


© 2023 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 Mastodon📧 Email