Last Updated: February 25, 2016
·
463
· choongyong

Run a script every n seconds

To run a script every n seconds, use the watch unix program

watch --interval=1 "ls -la"

The default interval is 2 seconds and the output is displayed fullscreen.