07-05-2006
Unable to display the date-time in seconds on AIX
Hi,
In unix the command "date +%s" displays the date-time in seconds since â00:00:00 1970-01-01 UTCâ (a GNU extension)
when executed on unix:
-sh-2.05b$ date +%s
1152092690
I tried with all the format control output but unable to display the date-time in seconds i,e as in unix format. Can anybody tell me how to display date-time in seconds on AIX or give me the equivalent command as in unix.
Thanks,
Haroon
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I was wondering if anyone had a script that would display the last time a user logged into a particular machine. I know about the "last" command, but it gives too much info.... I just wanted to know the last time a user used his/her id. ANy help would be greatly appreciated.
Ryan (3 Replies)
Discussion started by: ryaneverett5
3 Replies
2. Solaris
Hi Friends,
Can any one guide me regarding 'Display the date and time' command other than the command 'date'
thanks n regards
SsRrIi (1 Reply)
Discussion started by: SsRrIi
1 Replies
3. Shell Programming and Scripting
Hi all,
may i know how to display time in minutes and seconds(may be milliseconds and even smaller that ) in shell scripts.... (1 Reply)
Discussion started by: santy
1 Replies
4. Shell Programming and Scripting
hi all,
am trying to 'grep' some text from a log file and use the 'cut' command to read from that line i just grep'ed to extract date/time and response times.
code sniplet i am using is :
grep -i 'text to grep' Out.log |
while read LINE;
do
... (11 Replies)
Discussion started by: cesarNZ
11 Replies
5. UNIX for Dummies Questions & Answers
I found via Google a way to show the date and time stamp once I log in. However, whenever I cd to another directory it doesn't display the correct path.
Here are the relevant parts from my .kshrc :
unset _h _m _s
eval $(date "+_h=%H ;_m=%M ;_s=%S")
((SECONDS =... (3 Replies)
Discussion started by: Mike F.
3 Replies
6. Shell Programming and Scripting
I'm Using this script to find the time of a file. I'm very much new to PERL
and found this script posted by some one on this forum.
It runs perfectly fine, just that it gives me following errors with the
accurate output as well. I jus want the output to be stored in another file
so that i can... (0 Replies)
Discussion started by: bankimmehta
0 Replies
7. Shell Programming and Scripting
Hi,
I need help to display the yesterday date in format mentioned below:
2012-06-26-PMI tried this but it displays current date: `date +%Y-%m-%d-%p` (9 Replies)
Discussion started by: aroragaurav.84
9 Replies
8. UNIX for Dummies Questions & Answers
In gdb is there any way we can display date/time in first column while debugging or is there any command which will print date/time?
I am asking this just to know when exactly a breakpoint got hit. (6 Replies)
Discussion started by: rupeshkp728
6 Replies
9. UNIX for Dummies Questions & Answers
Below is the sample logfile:
Userids Date Time
acb Checkout time: 2013-11-20 17:00
axy Checkout time: 2013-11-22 12:00
der Checkout time: 2013-11-17 17:00
xyz Checkout time: 2013-11-19 16:00
ddd Checkout time: 2013-11-21 16:00
aaa Checkout... (9 Replies)
Discussion started by: asjaiswal
9 Replies
10. Shell Programming and Scripting
Hi to everybody
again i Need your help, i wasting hours but can't find a solutuin for my Problem. I am not an expert with AIX script programming.
I have a csh script and i need the time in seconds but since i have an old AIX the Option -%s doesnot exist with the date command. I seach in Google... (13 Replies)
Discussion started by: Nadielosabra
13 Replies
LEARN ABOUT REDHAT
alevt-date
ALEVT-DATE(1) Teletext time ALEVT-DATE(1)
NAME
alevt-date - display/set time received via Teletext
SYNOPSIS
alevt-date [options]
DESCRIPTION
alevt-date displays the time received from a Teletext source. It can be used to set the system time. The date is not interpreted (not
even transmitted on most channels). So it allows only adjustment of +/-12 hours. The default allowed adjustment is limited to +/-2 hours
(use -delta to change). Without the -set option it just displays the date in the format of the date(1) command.
OPTIONS
A summary of options is included below.
-set Set system time from time received via Teletext.
-delta seconds Maximum allowed adjustment made to the system time. The default is 7200 seconds (2 hours) and the maximum that may be
given is 12 hours.
-format string Format string to used to print the time. Look at strftime(3) for possible control sequences.
-vbi device Use the given device name. Default: /dev/vbi, /dev/vbi0, /dev/video0, /dev/dvb/adapter0/demux0 tried in this order.
-timeout seconds If the time can't be detected in seconds, the program is terminated with a SIGALRM.
-progname name Specifies the program name if using the DVB interface.
-pid pid Specifies the teletext PID if using the DVB interface.
--help Show summary of options.
--version Show version of program.
Before starting this program, you have to set the TV channel with another program like xawtv of set-tv.
Note: This program does not set the battery backed up clock of your computer. clock -w will do this.
The -progname or -pid option specifies the program or teletext PID if using the DVB interface.
If neither of these two options is used, alevt outputs informations about the currently accessible streams and uses the first of these PIDs
as default. This output contains the PIDs and names that can be used as an input for the -progname or -pid option in the context of the
currently chosen TV channel.
FILES
/dev/vbi*
/dev/dvb/adapter*/demux*
SEE ALSO
alevt(1x), alevt-cap(1), strftime(3), date(1), clock(8).
BUGS
This program is just a toy. The time transmitted by the TV stations is more than inaccurate. Some are within a few seconds of your local
time reference but others are more then 15 minutes off. You've been warned. (And don't assume the pkt8/30 time is better. It's even
worse.)
No bug reports to <froese@gmx.de> *g*.
LINUX 1.6.2 ALEVT-DATE(1)