Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!ukc!tcdcs!wsl!ken From: ken@wsl.UUCP (Kenneth Woods on wsl) Newsgroups: comp.unix.questions Subject: Re: how do you watch for an incoming file Summary: Try csh set mail Message-ID: <284@wsl.UUCP> Date: 7 Dec 89 23:24:34 GMT References: <5506@hplabsb.HP.COM> <1989Nov29.042955.8217@virtech.uucp> Reply-To: ken@wsl.ie (Kenneth Woods on wsl) Organization: Workhorse Systems, Dublin, Ireland Lines: 38 Expires: Sender: Followup-To: ----- News saved at 7 Dec 89 23:20:43 GMT >In article <5506@hplabsb.HP.COM>, quan@hplabsb.HP.COM (Suu Quan) writes: >> How do I write a C-program or shell script that will watch for >> the presence of a new file in a certain directory. If you use the C-shell you could try the following command set mail = ( 10 /usr/mail/$LOGNAME certain_directory ) csh will then send you the message "New mail in certain_directory" whenever a file is added or removed from that directory. You can use ls -t or whatever to find the actual name of the file. Newsgroups: comp.unix.questions,hp.unix Subject: Re: how do you watch for an incoming file Summary: Expires: References: <5506@hplabsb.HP.COM> <1989Nov29.042955.8217@virtech.uucp> Sender: Reply-To: ken@wsl.ie (Kenneth Woods on wsl) Followup-To: Distribution: Organization: Workhorse Systems, Dublin, Ireland Keywords: >In article <5506@hplabsb.HP.COM>, quan@hplabsb.HP.COM (Suu Quan) writes: >> How do I write a C-program or shell script that will watch for >> the presence of a new file in a certain directory. If you use the C-shell you could try the following command set mail = ( 10 /usr/mail/$LOGNAME certain_directory ) csh will then send you the message "New mail in certain_directory" whenever a file is added or removed from that directory. You can use ls -t or whatever to find the actual name of the file.