Forrest logo
back to the watch tool

watch:tldr:e6c11

watch: Re-run a command every 60 seconds.
$ watch -n ${60} ${command}
try on your machine

The watch command is used in Unix-like operating systems to execute a given command repeatedly in a specified interval and display the updated output on the console screen. The syntax of the watch command is as follows:

watch [options] command

In the given command:

watch -n ${60} ${command}
  • -n: This option is used to specify the interval at which the command will be executed. In this case, ${60} is used as a placeholder for a value (60 in this case) to be substituted. It means that the command will be executed every 60 seconds.
  • ${command}: This is also a placeholder for a command to be substituted. It represents the actual command or script that will be executed repeatedly.

So, in summary, the command watch -n ${60} ${command} will repeatedly execute the command specified by ${command} every 60 seconds, and display the updated output on the console screen.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the watch tool