Command syntax

Here's my situation. I am trying to move all files from one directory to another. I have the following requirements:

1) Move all files in /myfiles/wip matching pattern "*.tif" to /work/in that are at least 10 minutes old (or older).

2) When the files are moved, they need to be moved into /work/in with a ".tmp" extension (i.e., abc123.tif would be moved to abc123.tif.tmp).

I am not sure what the best way to do this is. I was thinking that the find command might be used along with a mv, but not sure how to pick up only those files which are 10 minutes old or older. This will be put into a script and executed through a cron job.

Any help on how to construct this would be greatly appreciated.

Take a look at this thread - towards the bottom it shows how to look for files that are newer than a default file - that's the only way to use find when looking for files mintues apart.

find / -type f -cmin -10

if you are on linux