What does Linux watch -e or –errexit option do?

You can use watch -e or –errexit option to freeze updates on command error, and exit after a keypress. By default, watch command does not stop updates when an error occurred.

Example:

The default behavior of watch command:

watch -e or –errexit option example:

Leave a Reply