07-02-2009
2,
0
Join Date: Mar 2008
Last Activity: 5 March 2010, 1:13 PM EST
Posts: 2
Thanks Given: 0
Thanked 0 Times in 0 Posts
Watch and copy a file
I need to write a simple shell script to watch a file in a directory and copy immedietly any files in that directory to another oldfiles directory once and later in the evening delete the file from the original directory.
File A arrives in dir1 at 8.00AM
Watch the file in dir1 and copy the file immedietly by appending time to another oldfiles directory.
Leave the orig file in dir 1 until end of day. End of day move the file to a directory called deleted with timeappend.
Need to keep a track of what time the file came. The file triggers some other process , so need to keep in the original directory for the whole day and move it in the evening.
This has to be done 24X7