Run a shell command when a file is added

前端 未结 6 535
梦毁少年i
梦毁少年i 2020-11-27 20:04

I have a folder named images on my linux box. This folder is connected to a website and the admin of the site has the ability to add pictures to this site. However, when a

6条回答
  •  悲哀的现实
    2020-11-27 20:24

    You might want to look at inotify

    The inotify API provides a mechanism for monitoring file system events. Inotify can be used to monitor individual files, or to monitor directories. When a directory is monitored, inotify will return events for the directory itself, and for files inside the directory.

提交回复
热议问题