On 19.11.2020 08:57, David W. Hodgins wrote:
On Thu, 19 Nov 2020 02:26:56 -0500, Janis Papanagnou
<janis_papanagnou@hotmail.com> wrote:
Search about inotify
Thanks. But this looks like a C-programming interface. Rather than a
programming interface I'd be looking either for an existing command line >>> tool or programming options that I can use for shell scripting the task.
See the output of the commands "inotifywait -h" and "inotifywatch -h"
from the inotify-tools package.
It seems that is it. Thanks!
I want to inspect file status information and directory contents
by some watchdog tool; e.g. new files appearing in a directory or
a file update should be detected and indicated by an alert window.
This should work only on dedicated files or directories, say, by
calling the tool with the respective name and/or file attributes.
Before I'm going to write my own command line tool I'd be interested
if there's something like that already existing.
On Thursday, November 19, 2020 at 11:35:41 AM UTC+8, Janis Papanagnou wrote:
I want to inspect file status information and directory contentsThere is a very helpful discussion here:
by some watchdog tool; e.g. new files appearing in a directory or
a file update should be detected and indicated by an alert window.
This should work only on dedicated files or directories, say, by
calling the tool with the respective name and/or file attributes.
Before I'm going to write my own command line tool I'd be interested
if there's something like that already existing.
https://superuser.com/questions/181517/how-to-execute-a-command-whenever-a-file-changes
On Thursday, August 5, 2021 at 4:05:49 PM UTC+8, hongy...@gmail.com wrote:
On Thursday, November 19, 2020 at 11:35:41 AM UTC+8, Janis Papanagnou wrote: >>> I want to inspect file status information and directory contents
by some watchdog tool; e.g. new files appearing in a directory orThere is a very helpful discussion here:
a file update should be detected and indicated by an alert window.
This should work only on dedicated files or directories, say, by
calling the tool with the respective name and/or file attributes.
Before I'm going to write my own command line tool I'd be interested
if there's something like that already existing.
https://superuser.com/questions/181517/how-to-execute-a-command-whenever-a-file-changes
Based on the suggestions given in the above discussion, I currently use the following code snippet:
inotifywait --quiet --monitor --event modify some-file-under-watch | while read change; do
do-something-here
done
HY
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 45:05:22 |
Calls: | 6,910 |
Files: | 12,376 |
Messages: | 5,429,356 |