![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A NEW version of "boot: cannot open kernel/sparcv9/unix " | biea | SUN Solaris | 6 | 10-01-2008 10:22 AM |
| add seconds to: date"|"time"|"HHMMSS | anaconga | UNIX for Advanced & Expert Users | 3 | 08-27-2008 01:17 PM |
| Linux Kernel "make xconfig" Enhancement Patch take3-11 (Default branch) | iBot | Software Releases - RSS News | 0 | 08-06-2008 01:20 PM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-20-2007 01:52 AM |
| What is meant by Kernel Parameter "dflssiz" in Digital Unix (OSF) | sameerdes | UNIX for Dummies Questions & Answers | 2 | 07-08-2003 12:40 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi!
I’m writing a kernel module on HP-UX 11.23, and I can’t find how to get the “number of seconds since epoch” (midnight of Jan 1st 1970). Actually I’m trying to find an equivalent to the user-space “time()” function… I found that in Linux, one can access “xtime.tv_sec” in the kernel and get the desired value, but I can’t seem to find it in HP-UX. Can anyone help? Thanks! |
|
||||
|
Hi Nati,
I only know how to get the seconds and number of days... Pls see the script below. Regards, René -------------------------------------------------------------------------- #! /bin/ksh #epoch sec after 1.1.1970 integer EPOCH=$(date -j -f "%a %b %d %T %Z %Y" "$(date)" "+%s") DAYSSINCE1970=$(( EPOCH % 86400 )) echo "DAYSSINCE1970=${DAYSSINCE1970}" |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| epoch, hp-ux, kernel, time |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|