Mar 15, 2007 #1 snowsmart IS-IT--Management May 24, 2005 37 CA I want to copy files from A dir to B Dir, but I only need copy the ones that does not exist in the B dir. Please help thanks
I want to copy files from A dir to B Dir, but I only need copy the ones that does not exist in the B dir. Please help thanks
Mar 15, 2007 #2 dandan123 Technical User Sep 9, 2005 505 US use rysync..u can download it from sunfreeware.com Upvote 0 Downvote
Mar 15, 2007 #3 sbrews Technical User Jun 11, 2003 413 US Assuming you dont have 100s of files to move, this will do the trick: Code: cd /location/A for foo in `ls` do if [ ! -e /location/B/$foo ] then cp /location/A/$foo /location/B/ fi done Upvote 0 Downvote
Assuming you dont have 100s of files to move, this will do the trick: Code: cd /location/A for foo in `ls` do if [ ! -e /location/B/$foo ] then cp /location/A/$foo /location/B/ fi done
Mar 15, 2007 Thread starter #4 snowsmart IS-IT--Management May 24, 2005 37 CA Thank you so much! Upvote 0 Downvote