What does Linux watch -n seconds or –interval seconds option do?

You can use watch -n seconds or –interval seconds option to specify update interval. The command will not allow quicker than 0.1 second interval, in which the smaller values are converted. Both ‘.’ and ‘,’ work for any locales. The WATCH_INTERVAL environment can be used to persistently set a non-default interval (following the same rules and formatting).

Example:

Create and execute a script that inserts 1 item every 1 sec indefinitely:

watch -n seconds or –interval seconds option example:

Leave a Reply