• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Trigger based on new file in a directory

aujames

Member
Does anybody know of a method to monitor a directory, and if a file lands in that directory kick off a script? I would like to avoid using cron if possible, and make the file arrival the trigger a action rather than cron running a script to process the file.

Thanks,
JD
 
inotify is pretty neat. I keep meaning to play with it a bit more...

OSSEC has support for it, but my current linux install doesn't. 😛
 
Originally posted by: n0cmonkey
Originally posted by: Nothinman
OSSEC has support for it, but my current linux install doesn't.

Inotify's been in the Linux kernel for over 4 years now...

Ok, so "current" was the wrong word. 😉

dayum

reminds me of the guy i worked with a couple of years ago who was responsible for keeping up the VOIP company's SIP server or something. he was running it on a fedora core 3 box when at least 7 was the current release.
 
Originally posted by: xSauronx
Originally posted by: n0cmonkey
Originally posted by: Nothinman
OSSEC has support for it, but my current linux install doesn't.

Inotify's been in the Linux kernel for over 4 years now...

Ok, so "current" was the wrong word. 😉

dayum

reminds me of the guy i worked with a couple of years ago who was responsible for keeping up the VOIP company's SIP server or something. he was running it on a fedora core 3 box when at least 7 was the current release.

My distro/version is at least supported. 😛
 
Shoulda mentioned that in the first place. =)

I have no experience with AIX and don't know if it has something analogous to inotify.
 
Originally posted by: n0cmonkey
Originally posted by: xSauronx
Originally posted by: n0cmonkey
Originally posted by: Nothinman
OSSEC has support for it, but my current linux install doesn't.

Inotify's been in the Linux kernel for over 4 years now...

Ok, so "current" was the wrong word. 😉

dayum

reminds me of the guy i worked with a couple of years ago who was responsible for keeping up the VOIP company's SIP server or something. he was running it on a fedora core 3 box when at least 7 was the current release.

My distro/version is at least supported. 😛

:thumbsup: 😀
 
Originally posted by: aujames
Thanks guys, inotify appears to be exactly what I need, only problem this box is AIX instead of Linux..

Oops. I don't know AIX, but a quick shell/perl/python/whatever script could take care of that. Doesn't need to be cron'ed, just have it loop after a little nap.
 
Originally posted by: n0cmonkey
Originally posted by: aujames
Thanks guys, inotify appears to be exactly what I need, only problem this box is AIX instead of Linux..

Oops. I don't know AIX, but a quick shell/perl/python/whatever script could take care of that. Doesn't need to be cron'ed, just have it loop after a little nap.

Good idea, I'll give that a try.

Thanks!
 
Originally posted by: xSauronx
Originally posted by: n0cmonkey
Originally posted by: Nothinman
OSSEC has support for it, but my current linux install doesn't.

Inotify's been in the Linux kernel for over 4 years now...

Ok, so "current" was the wrong word. 😉

dayum

reminds me of the guy i worked with a couple of years ago who was responsible for keeping up the VOIP company's SIP server or something. he was running it on a fedora core 3 box when at least 7 was the current release.

I just removed a Fedora Core 2 machine from production about 2 weeks ago. It ran for 3 years without a single hiccup, not even a single reboot before it died due to a power supply failure. I replaced the power supply and it ran for almost another 2 years (again, without a single reboot or a single second of downtime) before I replaced a couple weeks ago.

And the only reason I replaced it is because it was located at a remote office and a network redesign allowed me to pull that back into our main datacenter and put it in a virtual machine. Otherwise, why replace a machine that has 99.999% uptime?
 
Originally posted by: Brazen
Originally posted by: xSauronx
Originally posted by: n0cmonkey
Originally posted by: Nothinman
OSSEC has support for it, but my current linux install doesn't.

Inotify's been in the Linux kernel for over 4 years now...

Ok, so "current" was the wrong word. 😉

dayum

reminds me of the guy i worked with a couple of years ago who was responsible for keeping up the VOIP company's SIP server or something. he was running it on a fedora core 3 box when at least 7 was the current release.

I just removed a Fedora Core 2 machine from production about 2 weeks ago. It ran for 3 years without a single hiccup, not even a single reboot before it died due to a power supply failure. I replaced the power supply and it ran for almost another 2 years (again, without a single reboot or a single second of downtime) before I replaced a couple weeks ago.

And the only reason I replaced it is because it was located at a remote office and a network redesign allowed me to pull that back into our main datacenter and put it in a virtual machine. Otherwise, why replace a machine that has 99.999% uptime?

How did you handle patches?
 
Back
Top