I need to copy files to different location but only copy those file havenot been copies yet (new files been created continuously)
does anyone have idea how to do it?
I try use find -newer but it does not work when 2 files created at the same time - only copy one, here is my logic.
if [ ! -a rcp.tim ] ; then
for F in `find . -type f -newer rcp.tim -name 'arch*'|sort`
echo "cp $F /newdir/$F"
cp $F /newdir/
cp -p $F rcp.tim