LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   basic script to modify time settings (https://www.linuxquestions.org/questions/linux-newbie-8/basic-script-to-modify-time-settings-870537/)

dnoy 03-23-2011 12:53 PM

basic script to modify time settings
 
I am trying to write a basic script on a linux box to do the following:


change the timezone to UTC. I will need to make sure /etc/sysconfig/clock only has the following:

HWCLOCK=-u
SYSTOHC=yes
TIMEZONE=UTC
DEFAULT_TIMEZONE=UTC



I also need this script to inject

5 * * * * /usr/sbin/ntpdate -b 192.168.0.1

in crontab

i dont think i have the crontab logic right as im probably missing a ' or a " maybe i just need to use it in a .sh file

please let me know

thank you,

corp769 03-23-2011 01:01 PM

You don't think? Have you tried it yet?

dnoy 03-23-2011 06:04 PM

yes i tried it and it didnt work


All times are GMT -5. The time now is 08:25 PM.