Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I watch a directory for changes && call a script?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
eddieparker
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2004
Posts: 147

PostPosted: Tue Jun 10, 2008 4:13 pm    Post subject: How do I watch a directory for changes && call a scr Reply with quote

Hi!

Basically the subject says it all.

I'm curious how the best way to monitor a directory for changes is, and call a script when something does.

I used to write a script using stat's and such, but surely there's got to be a tool that does this somewhere already, using inotify/dnotify or some such under the hood?

Anyhow, if there's not, then fine. Just thought I'd ask.

Thanks!
Back to top
View user's profile Send private message
nativemad
Developer
Developer


Joined: 30 Aug 2004
Posts: 911
Location: Switzerland

PostPosted: Tue Jun 10, 2008 4:49 pm    Post subject: Reply with quote

incron does it! :wink:

Cheers!
_________________
Power to the people!
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3789
Location: sleeping in the bathtub

PostPosted: Tue Jun 10, 2008 4:58 pm    Post subject: Reply with quote

nativemad wrote:
incron does it! :wink:

Cheers!
I was going to suggest sys-fs/inotify-tools, a package with cli inotify tools, but incron looks pretty damn useful.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
eddieparker
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2004
Posts: 147

PostPosted: Tue Jun 10, 2008 5:33 pm    Post subject: Reply with quote

Hot donkey! That's exactly what I was looking for.

Thanks so much!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum