05-11-2007
ntp is designed exactly for that.
Do you want a one-time piece of code to fetch time/date from a local server or do you want to keep the system clock in sync with a network time server?
Consider doing some reading -
www.ntp.org
xntpd or ntpd may already be part of your system.
Some systems come with /usr/bin/ntpdate which does the onetime fetch and time set. Check yours.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Can anybody help me in finding out a solution for the problem below?
When we write .unix or .sh files in windows OS and port them to Unix platforms there is a character ^M inserted at the end of each line of the script file.
During ftp porting I set the transfer mode as ASCII for the script... (7 Replies)
Discussion started by: tamilselvi
7 Replies
2. UNIX Desktop Questions & Answers
I need to change the time on my SUN box, it is five minutes fast. (4 Replies)
Discussion started by: michelemcdonald
4 Replies
3. Shell Programming and Scripting
I want to fetch passwords from a common file xxxx.txt and use it in a script.
Currently the password is hardcoded so this have to be changed so that password can be fetched from text file.....
Please reply asap..
Thanks (4 Replies)
Discussion started by: shikhakaul
4 Replies
4. HP-UX
HP-UX B.11.23 ia64
Hi everyone,
First of all I am new member to this forum. Thankyou all for this forum, it helped me many times.
Coming to my question,I am writing a C program to find the log info of the users who are currently logged in(precisely what who -u do).
I am able to get... (0 Replies)
Discussion started by: bhiku matre
0 Replies
5. Shell Programming and Scripting
Hello All,
I wanted to get the software to be fetched from the Service Provide URL to my unix server. I tired using the mget, but resulted in error. Please take a look.
$ wget -O V3-0-5-2.Solaris8-SPARC.tar.gz --http-user=hd87es3 --http-passwd=987dnja7 http://beyond.abinitio.com... (3 Replies)
Discussion started by: raghunsi
3 Replies
6. Linux
Hi,
Can any one please help me increase the arp stale time of an ipv6 interface on linux platform ?
I have tried increasing the variable gc_stale_time but that doesnt work.
Thanks (2 Replies)
Discussion started by: dkothapa
2 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I have a file with the below data as shown.
A|2|20120430
B|EMP|NAME|DEPT
C|12|SARC|01
C|23||ASDD|02
D|END OF FILE
I want to fetch only the records that contains C|, what is unix command to fetch this data.
Thanks (5 Replies)
Discussion started by: halpavan2
5 Replies
8. Shell Programming and Scripting
Hello, How All are Doing today. I have a issue, I have a file which contains the data as follow
<ENVELOPE><ENVELOPE_ID>TEST</ENVELOPE_ID><ENVELOPE_EXTERNAL_ID></ENVELOPE_EXTERNAL_ID><ENVELOPE_VERSION>2</ENVELOPE_VERSION><SIResourceDefaultVersion>true</SIResourceDefaultVersion><TYPE>GS... (1 Reply)
Discussion started by: adisky123
1 Replies
9. Red Hat
Hi
We have one centos Server on Asterisk platform and using OS Open source dialer for dialing outbound connections.We are using eyebeam as a softphone for calling with Server ip 192.168.1.X.Today i found dialing issues with each client side phones.Not showing pause/resume button when browse... (0 Replies)
Discussion started by: Vaibhav.T
0 Replies
10. UNIX for Beginners Questions & Answers
Hi there,
What is the equivalent of fetch command in Ubuntu/Cygwin. My purpose is to modify the code in such a way that I can use fetch.
#!/bin/sh
#============================================================================
# $Id: ios-http-auth.sh,v 1.1 2001/06/29 00:59:44 root Exp root... (1 Reply)
Discussion started by: alvinoo
1 Replies
TIME(3F) TIME(3F)
NAME
time, ctime, ltime, gmtime - return system time
SYNOPSIS
integer function time()
character*(*) function ctime (stime)
integer stime
subroutine ltime (stime, tarray)
integer stime, tarray(9)
subroutine gmtime (stime, tarray)
integer stime, tarray(9)
DESCRIPTION
Time returns the time since 00:00:00 GMT, Jan. 1, 1970, measured in seconds. This is the value of the UNIX system clock.
Ctime converts a system time to a 24 character ASCII string. The format is described under ctime(3). No 'newline' or NULL will be
included.
Ltime and gmtime disect a UNIX time into month, day, etc., either for the local time zone or as GMT. The order and meaning of each element
returned in tarray is described under ctime(3).
FILES
/usr/lib/libU77.a
SEE ALSO
ctime(3), itime(3F), idate(3F), fdate(3F)
4.2 Berkeley Distribution May 15, 1985 TIME(3F)