Shell Script - Copy File at intervals

Hi,
I want to copy some files from a Folder say, /usr/X at random intervals to another location.

Basically, new files will be dumped at random intervals to location /usr/X and I have to copy those new files to some other location (after copying, I cannot delete those files from source location).

Can anybody help me with the script for the same ?

Thx in advance

How about using cron .

Check the man pages of crontab for more details

  1. I do not know the intervals, so what to set in CRON. Intervals are random. Do I set * * * * * i.e. check every minute or say check every hour ?

  2. How to check for new Files/changed files through script in Solaris ?

  3. If a copy operation fails, then how to capture the error value and display to the user ?

Just started to work on Solaris couple of weeks back.