Hi,
 
I have a cron that moves *.prn files to another folder every 1 minute.
 
Now the issue is that even if any, say 1.prn is in use by some other process, 
the cron moves it.
 
How to restrict this?
 
I tried modifying the below (googled), but still file in use also gets copied.
 
comm -2 -3 <(find $dir -maxdepth 1 -type f|sort) <(sudo lsof $dir/* | awk 
'(NR>1) {print $9}'|sort) | xargs -I {} mv {} $move_dir
 
Please help.

Thanks and Regards,
Amit Sharma
 

_______________________________________________
Ilugd mailing list
Ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd

Reply via email to