how to check the existence of a file using korn shell?

we have tranferred an ear from local server to remote server using ftp.consider, we have an ear file named a.ear in remote server,again if we transfer the same file named a.ear from local server to remote server.we need the kshell to check the existence of the ear file in remote server,and if the same file exists without any change ,it must echo an message and should not overwrite the ear.help ASAP....

To test the existence of a file there is "test -e <file>", but this is not what you want. You wnat not only to test the existence but also if two files (the remote and the local copy) are identical.

Maybe you could use "rsync", which does exactly that - transfer only a file which has changed.

I hope this helps.

bakunin

thank u backunin...actually i am a newbie, so can u explain with script which uses the"rsync".

Google is your friend: enter "rsync" into google and the very first link to come up is: rsync , complete with downloads, documentation, examples, an FAQ, and, and, and ....

bakunin