Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-06-2005, 10:30 PM   #1
LQ Newbie
Registered: Nov 2005
Posts: 3

Rep: Reputation: 0
How to Monitor a Directory

Does anyone know of a way to monitor a directory instead of using a cron job?

I have an external source sending me hockey pool statistics via ftp into a certain folder automatically every few days or so and I want to know if there is a way to trigger a PHP script to run when the user has disconnected.

Can anyone help?
Old 11-07-2005, 07:02 AM   #2
Registered: Oct 2005
Location: Oxford, UK
Distribution: Debian Etch (w/ dual-boot XP for gaming)
Posts: 282

Rep: Reputation: 31
Is there any particular reason why you don't want to use cron jobs? As far as I can tell, it seems that any other solution would require a process to be constantly looking at the directory - which would undoubtedly use up more resources. Besides, such a process would probably check the directory, put itself to sleep for a bit, then check again, so it'd even be acting in a similar fashion.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Monitor directory size in real-time billygoat32 Linux - Software 2 10-28-2005 09:21 AM
shell script: delete all directories named directory.# except directory.N brian0918 Programming 3 07-13-2005 06:54 PM
Automatically Copying files from the ftp directory into the html directory swatward Linux - General 3 04-17-2005 10:55 PM
Protect File: how to monitor directory effectively? iclinux Programming 1 12-30-2004 03:02 AM
write permissions for directory - not accidently move/deleted the directory linuxgamer Linux - Newbie 10 12-02-2003 03:04 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:53 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration