View previous topic :: View next topic |
Author |
Message |
XenoTerraCide Veteran
Joined: 18 Jan 2004 Posts: 1418 Location: MI, USA
|
Posted: Sun Feb 22, 2009 6:23 am Post subject: watch a directory for file changes |
|
|
I need a program that will watch a directory for file changes... it would be great if it could log what application/user/group made those changes. _________________ I don't hang out here anymore, try asking on http://unix.stackexchange.com/ if you want my help. |
|
Back to top |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Sun Feb 22, 2009 6:32 am Post subject: |
|
|
You might want to take a look at dazuko: http://dazuko.dnsalias.org/wiki/index.php/Main_Page
Dazuko is a kernel patch that allows for notification for file changes. I would recommend patching the kernel yourself instead of using the version in portage. Although dazuko is only the kernel patch, I'm guessing there are examples or utilities that utilize it.
BTW - If you need help patching the kernel, I wrote a howto on how to use dazuko with clamav a while ago:
https://forums.gentoo.org/viewtopic-t-604709.html |
|
Back to top |
|
|
XenoTerraCide Veteran
Joined: 18 Jan 2004 Posts: 1418 Location: MI, USA
|
Posted: Sun Feb 22, 2009 7:15 am Post subject: |
|
|
hmmm... remind me what dazuko does that inotify doesn't?
EDIT: yeah I ran the whole dazuko clamav thing back in the day... clamav isn't something I need in this case....
at least I hope I haven't managed to find a linux virus. _________________ I don't hang out here anymore, try asking on http://unix.stackexchange.com/ if you want my help. |
|
Back to top |
|
|
Tekeli Li Tux's lil' helper
Joined: 03 Jan 2009 Posts: 95
|
Posted: Sun Feb 22, 2009 9:43 am Post subject: |
|
|
Wait, what's wrong with fam/gamin? There are even Python bindings... |
|
Back to top |
|
|
makism Tux's lil' helper
Joined: 24 Oct 2007 Posts: 85
|
Posted: Sun Feb 22, 2009 10:26 am Post subject: |
|
|
i think pyinotify is pretty cool. using python bindings is very easy to do your job...
it`s in the portage alright... |
|
Back to top |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Sun Feb 22, 2009 3:31 pm Post subject: |
|
|
XenoTerraCide wrote: | hmmm... remind me what dazuko does that inotify doesn't? | Dazuko is a little more comprehensive than inotify. I believe inotify only works with individual files and can only see file changes, where as dazuko can handle whole directories, and other attributes like file access, etc.
Don't hold me to the above statement however |
|
Back to top |
|
|
XenoTerraCide Veteran
Joined: 18 Jan 2004 Posts: 1418 Location: MI, USA
|
Posted: Sun Feb 22, 2009 4:44 pm Post subject: |
|
|
I'm not saying dazuko isn't awesome, but it's probably more work than I need in this case.
hmm.... pyinotify sounds interestings... too bad I don't know more about python, although at this point it does sound like I'm gonna have to write at least part of the tool to do what I need. _________________ I don't hang out here anymore, try asking on http://unix.stackexchange.com/ if you want my help. |
|
Back to top |
|
|
makism Tux's lil' helper
Joined: 24 Oct 2007 Posts: 85
|
|
Back to top |
|
|
M Guru
Joined: 12 Dec 2006 Posts: 432
|
|
Back to top |
|
|
XenoTerraCide Veteran
Joined: 18 Jan 2004 Posts: 1418 Location: MI, USA
|
Posted: Sun Feb 22, 2009 8:33 pm Post subject: |
|
|
I just noticed the fam/gamin comment. so thus far will any of these tell me which application is modifying these files... _________________ I don't hang out here anymore, try asking on http://unix.stackexchange.com/ if you want my help. |
|
Back to top |
|
|
|