Moving files from one server to another server every 5 min

HI All,

I am trying to automate my stuff to make 'to-do-easier'.

I am new to shell scripting. I need help to you regarding the below problem.

I have one directory in my server, frequently files will store in that directory. I want to move that files into another server on every 5 minites.

I want one shell script for automate the above process. and i am unable to find files which is still under process.

Thanks in advance

I'm not sure what this means.

To copy files from one server to another, you can run the scp command.

scp local-file remote-server:/path/to/remote/file

To login without a password, you should use pre-shared keys. (The instructions for ssh are the same as for scp. Whenever ssh can login, scp can login, it's the same protocol in the end.)

Thanks for you reply. Now, I am able to scp but main problem is "finding files which is under process". some times my script takes updating files. I lossing some data.

:b:also you can use the tar command

what do u mean by files under process.. does ur process has some specific name...

moreover, can you tell me the output of "ps -eaf " in ur source directory from where u do scp.

Why you don't try man rsync ("rsync")