Someone asked me to update the times on 4 servers that are not connected to the internet and they have no ntp server.
e.g
/etc/hosts
146.92.25.3 jollibee
146.92.25.4 mcdonalds
146.92.25.5 burgerking
146.92.25.6 chowking
The easiest thing for me to do would be to run
date -s "25 Jul 2012 14:40:00"
for each of the 4 servers.
I know they will want me to do this again in the future and I find it a pain to set the time manually. What i want to do is set the time on one box and then set the times on the other boxes off this box.
e.g. if i set jollibee's time to the correct date i would then run
[root@mcdonalds /]# date -s `ssh jollibee 'date +"%d %b %Y %T"'`
and so on for my other servers
Thing is I'm getting:
date: too many non-option arguments: 2012 ...
Try `date --help' for more information.
Can anyone tell me what I'm doing wrong here?