I read about rsync but I want to ask how can I do the following by rsync:
I have two files in to different machine (UNIX-AIX) and have the same name.
server1 : ..../file.txt
server2 : ..../file.txt
I want to apply the following in two server to make sure I have the latest version of file.txt
on each server.
server1:
if (mod-time[file.txt (on server 1] > mod-time[file.txt (on server2)] )
{
update file.txt (on server 2 ) to become as file.txt (on server 1) ;
}
else
{
skip ;
}
server2:
if (mod-time[file.txt (on server2)] > mod-time[file.txt (on server1)] )
{
update file.txt (on server 1 ) to become as file.txt (on server 2) ;
}
else
{
skip ;
}