Show pagesourceBack to top Share via Share via... Twitter LinkedIn Telegram Yammer RedditRecent ChangesSend via e-MailPrintPermalink × inotify With inotify, you can efficiently watch your filesystem for changes and run commands based on the results. Limits You can get your current inotify file watch limit by executing: $ cat /proc/sys/fs/inotify/max_user_watches You may need to increase the number of files one user can watch with inotify. Many distributions have a default limit of 8192 watched files per user. The maximum amount is 524288. You can set a new limit temporary with: $ sudo sysctl fs.inotify.max_user_watches=524288 $ sudo sysctl -p To make it permanent, store it in the sysctl config file. /etc/sysctl.d/40-max-user-watches.conf fs.inotify.max_user_watches=524288 On Arch Linux, Fedora and other RPM-based distributions, you apply this with sudo sysctl –system. On Debian, Ubuntu and many other systems, this has to be in /etc/sysctl.conf and you apply it with sudo sysctl -p. You may also need to pay attention to the values of fs.inotify.max_queued_events and fs.inotify.max_user_instances if watching is slow or hangs. (source) Programs using inotify Non-exhaustive list of programs which use inotify to watch for changes and may have problems with restrictive limits: Syncthing Visual Studio Code Last modified: 2020-07-22 19:59