...

/

Running Tasks When Files Change

Running Tasks When Files Change

Learn about entr command and its various uses.

We'll cover the following...

Executing commands with entr

The entr command can watch files for changes and execute any command we need. There are plenty of other utilities available, but entr is one of the most flexible options, and it requires no configuration to use. To install entr using the package manager, we run this:

sudo apt install entr

The entr command takes a list of files from STDIN and executes the given command when the files change. Let’s use entr to watch a Markdown document for changes and use pandoc to convert it ...