![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Polling an FTP site for a file | Peejay | UNIX for Advanced & Expert Users | 6 | 07-15-2008 06:22 PM |
| How to implement polling for a function using timer in C? | naan | High Level Programming | 7 | 11-19-2007 04:00 AM |
| Polling/Interrogate Directory Questions | dnidiffer | Shell Programming and Scripting | 1 | 06-14-2005 10:20 PM |
| rlogin/rsh incoming port | andryk | High Level Programming | 1 | 08-17-2004 11:21 AM |
| Help - Polling Script | brianmu | High Level Programming | 1 | 09-06-2001 11:15 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Detecting incoming files without busy polling
Hello, I'd like to handle incoming (uploaded) files from a shell script, ideally without busy polling / waiting (e.g. running a cron task every 15'). Is there a command that would just sleep until a new entry has been created in a directory, allowing scripts such as the following: Code:
while watchdir $SOMEDIR
do
# process new files here
done
The "watchdir" command should ideally only wake up when the new entries aren't being used (or at least written to) by anyone, so the file can safely be handled. This will have to run on HP-UX, but I am interested in linux alternatives, or even pointer to the underlying API or system call. Thanks. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|