Watching a command

The command watch executes a program periodically, showing output full screen. By default, the program is run every 2 seconds; use -n or -interval to specify a different interval. For example, you can use watch to see how much memory is being used on your system every 5 seconds with the following command.

watch -n 5 free -h