Sponsored Content
Top Forums Shell Programming and Scripting Get timestamp with millisecond precision Post 302651863 by krupasindhu18 on Wednesday 6th of June 2012 09:55:35 AM
Old 06-06-2012
Get timestamp with millisecond precision

Hi All,

could any body let me know.
how to get timestamp with millisecond precision in unix bash shell.
example -->2005-12-06- 4-22-35-195

please help me.

Thanks,
KrupaSmilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

precision getting?

I need to find out the precision on a solaris machine using the unix terminal. How do I find this out? Specifics needed: How are single precision numbers represented (8 or 16 bit) How are double precision numbers represented (16 or 32 bit) How are they stored. ( some computers store numbers... (1 Reply)
Discussion started by: Townsfolk
1 Replies

2. Programming

Help! Display Time with Millisecond

Hi All, Urgent! Just a newbie needing advice. Has anybody have a sample C script code in Unix to display time with milliseconds? Most of the research I'm doing is up to the seconds format only. Thanks! Leidail (3 Replies)
Discussion started by: rezlez
3 Replies

3. Shell Programming and Scripting

How to find date Difference in AWK/GAWK with millisecond precision

Hi, I have a log file that has the date in this format "2006-05-30_13:14:04,256". I need to find the time difference between two log entries in milliseconds. How to achieve this in AWK/GAWK script? :confused: (2 Replies)
Discussion started by: omprasad
2 Replies

4. Programming

max precision in float

Hi, As all of us know that size of int is machine as well as compiler dependent we can get the range and size of an int , float and char etc in /usr/include/limits.h header file of a compiler but could any one tell me how to get info of precision of float and ... (6 Replies)
Discussion started by: useless79
6 Replies

5. UNIX for Dummies Questions & Answers

How to compare a file by its timestamp and store in a different location whenever timestamp changes?

Hi All, I am new to unix programming. I am trying for a requirement and the requirement goes like this..... I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
Discussion started by: mailsara
2 Replies

6. Shell Programming and Scripting

Precision in print

I have a shell script which prints a variable to a text file (sorry if this is the wrong terminology, I'm new to this): awk `{sumdiffsqt+=$1;stdevt=sqrt(sumdiffsqt/('${n}'-1));errt=stdevt/sqrt('${n}')} END {print '$period',stdevt,errt}' diffsqt.txt >> ${xstation1}_${xstation2}_tt.err I need... (4 Replies)
Discussion started by: claire.a
4 Replies

7. Shell Programming and Scripting

To check timestamp in logfile and display lines upto 3 hours before current timestamp

Hi Friends, I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only I can get the... (12 Replies)
Discussion started by: srkmish
12 Replies

8. Shell Programming and Scripting

AIX : Need to convert UNIX Timestamp to normal timestamp

Hello , I am working on AIX. I have to convert Unix timestamp to normal timestamp. Below is the file. The Unix timestamp will always be preceded by EFFECTIVE_TIME as first field as shown and there could be multiple EFFECTIVE_TIME in the file : 3.txt Contents of... (6 Replies)
Discussion started by: rahul2662
6 Replies

9. Shell Programming and Scripting

Grep lines between last hour timestamp and current timestamp

So basically I have a log file and each line in this log file starts with a timestamp: MON DD HH:MM:SS SEP 15 07:30:01 I need to grep all the lines between last hour timestamp and current timestamp. Then these lines will be moved to a tmp file from which I will grep for particular strings. ... (1 Reply)
Discussion started by: nms
1 Replies

10. UNIX for Advanced & Expert Users

Subtract millisecond Timestamps with awk

Hello, am not able to subtract timestamps in milliseconds. I extract the timestamp as a string, and then try to subtract the two, but since it is a string, system just outputs 0 awk -F"," 'substr($1,0,13) - substr($2,0,013)' File where $1 and $2 are the timestamps in the format... (4 Replies)
Discussion started by: sidnow
4 Replies
UTMPDUMP(1)                                                        User Commands                                                       UTMPDUMP(1)

NAME
utmpdump - dump UTMP and WTMP files in raw format SYNOPSIS
utmpdump [options] [filename] DESCRIPTION
utmpdump is a simple program to dump UTMP and WTMP files in raw format, so they can be examined. utmpdump reads from stdin unless a file- name is passed. OPTIONS
-f, --follow Output appended data as the file grows. -o, --output file Write command output to file instead of standard output. -r, --reverse Undump, write back edited login information into the utmp or wtmp files. -V, --version Display version information and exit. -h, --help Display help text and exit. NOTES
utmpdump can be useful in cases of corrupted utmp or wtmp entries. It can dump out utmp/wtmp to an ASCII file, which can then be edited to remove bogus entries, and reintegrated using: utmpdump -r < ascii_file > wtmp But be warned, utmpdump was written for debugging purposes only. File formats The only binary version of the utmp(5) is standardised. Textual dumps may become incompatible in future. The version 2.28 was the last one that printed text output using ctime(3) timestamp format. Newer dumps use millisecond precision ISO-8601 timestamp format in UTC-0 timezone. Conversion from former timestamp format can be made to binary, although attempt to do so can lead the timestamps to drift amount of timezone offset. BUGS
You may not use the -r option, as the format for the utmp/wtmp files strongly depends on the input format. This tool was not written for normal use, but for debugging only. AUTHOR
Michael Krapp SEE ALSO
last(1), w(1), who(1), utmp(5) AVAILABILITY
The utmpdump command is part of the util-linux package and is available from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils /util-linux/>. util-linux July 2014 UTMPDUMP(1)
All times are GMT -4. The time now is 11:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy