Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: Rob Wilkins on January 31, 2002, 12:10:26 PM
-
How can I check for a not empty directory and do something if a file lands in it.
Example:
I would like to have e-smith check /user/Maildir/new for any new email files that appear and run a cron job to send a beep to the consol.
I am just looking for the routine or command to use to see if a directory has any files in it.
Thanks.
-
Rob Wilkins wrote:
>
> How can I check for a not empty directory and do something if
> a file lands in it.
test find /user/Maildir/new -type f && echo -e '\a'
--
Damien