User's manual. Section 1.

ON(1): notify the user or run commands when files or user status change


USAGE

DESCRIPTION

On watches for file system or user status changes and runs a command when such event happens. If no command is given the changed file name, or the new user status, is printed. When a command is given, the command is executed with any "%" sign replaced with the name for the changed file or the new user status.

If the file is a directory it is considered as changed when either the directory or its contents change. But there is no recursion to sub-directories.

When file is idle or busy the command is run when the user becomes idle or ceases being idle. When file is wakeup the command runs when the terminal resumes from sleep. When file is user the command runs upon any of these events.

EXAMPLES

SOURCE


User's manual. Section 1.