I want a script to sleep unless a certain file is modifed/deleted (or a file created in a certain directory, or ...). Can this be achieved in some elegant way? The simplest thing that comes to my mind is a loop that sleeps for some time before checking the status again, but maybe there is a more elegant way?
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
On linux, you can use the kernel's Example use from wiki:
|
|||
|
There is an API called inotify for C programmers. There are some tools that use it, e.g. incron and inotify-tools. |
|||
|