Need a Script-Help

Hi All,
I need a shell script which compares two directories and if not matching, copy the missing files to the second one. Can any body help me in this sort. I am a new bie hence i dont know much in scripting..

why don't you consider using rsync for this task? what is rsync?

Thanks a llott.. :slight_smile:

But I am getting an error when i use this like the following

rsync -avz . newftp05.nus.ssssa.com:/dev/tempfolder
newftp05.nus.ssssa.com: Connection refused
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(165)

Can u plz help me to sort out this...?? It would be a gr8 help..

Have a read here
Rsync mirroring howto and FAQ

Ahamed Shameer
netgiz.net -

And where is your target directory ?

The reason is very clear ... for me :wink: