You can view the two files using the cat command as show. The following command writes a configuration file called state under /usr/local/var/run/watchman/-state/, in JSON format as well as a log file called log in the same location. To watch a directory (e.g ~/bin) for changes, run the following command. Watchman can be configured in two ways: (1) via the command-line while the daemon is running in background or (2) via a configuration file written in JSON format. Watching Files and Directories with Watchman in Linux Once required dependencies installed, you can start building watchman by downloading its github repository, move into the local repository, configure, build and install it using following commands. $ sudo dnf groupinstall 'Development Tools' $ sudo dnf install autoconf automake python-setuptools openssl-devel libssl-devel libtool # yum install autoconf automake python-setuptools python-devel openssl-devel libssl-devel libtool $ sudo apt install autoconf automake build-essential python-setuptools python-dev libssl-dev libtool We will install watchman service from sources, so first install these required dependencies libssl-dev, autoconf, automake libtool, setuptools, python-devel and libfolly using following command on your Linux distribution. Installing Watchman File Watching Service in Linux We will also briefly demonstrate how to watch a directory and invoke a script when it changes. In this article, we will explain how to install and use watchman to watch (monitor) files and record when they change in Linux.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |