How it works...

The inotifywait command is mostly used in shell scripting. The main purpose of the inotify tool is to monitor the directories and new files. It also monitors the changes in the files.

Get Bash Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.