Re: Watching a directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



> Let start with adding files. What tools are available for me to watch a directory. 
> In an example, if a file is added to a directory I want to run a shell script that 
> will do some conversation on the file to produce a second copy.

I just was working on something like this today - yum search inotify - here's a nice intro with an example close to what I'm using:

https://github.com/rvoicilas/inotify-tools/wiki/#info (inotifywait example 1)

I used -e create -e modify -e delete instead of -e close_wait - see the man page for events.

Very slick so far.

Josh
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux