|
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
|