Read more

Repeatedly execute a bash command and observe its output

Dominik Schöler
October 25, 2016Software engineer at makandra GmbH

You can have a command repeatedly executed and the output displayed. This is useful e.g. for monitoring file system changes with ls, but has many more applications.
The update frequency is controlled by the -n argument (default: 2s), which is locale-specific; i.e. you might need to use a comma as delimiter.

  > watch -n 1.5 ls
Illustration money motivation

Opscomplete powered by makandra brand

Save money by migrating from AWS to our fully managed hosting in Germany.

  • Trusted by over 100 customers
  • Ready to use with Ruby, Node.js, PHP
  • Proactive management by operations experts
Read more Show archive.org snapshot
Posted by Dominik Schöler to makandra dev (2016-10-25 13:15)