- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How can I get the time in seconds from the command...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 07:29 AM
03-03-2003 07:29 AM
How can I get the time in seconds from the command line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 07:57 AM
03-03-2003 07:57 AM
Re: How can I get the time in seconds from the command line.
I'd use perl:
perl -e 'print time(),"\n"'
rgds, Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 08:08 AM
03-03-2003 08:08 AM
Re: How can I get the time in seconds from the command line.
NSECONDS=$(perl -e 'print scalar time')
echo "Epoch seconds = ${NSECONDS}"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 08:28 AM
03-03-2003 08:28 AM
Re: How can I get the time in seconds from the command line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 09:09 AM
03-03-2003 09:09 AM
Re: How can I get the time in seconds from the command line.
Example: Try 'timex ioscan -fnC disk' for starters, and compare with 'timex ioscan -funC disk'. The first time (without the u argument to the ioscan) it took 16.64 seconds on one of my systems. With the u command, it took 0.18 seconds. The difference is that the -u argument read the disk configuration from memory, while the command without it actually caused the system to go out and see what disks it actually had.
We use timex here to check on how fast our backups are going.
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 09:50 AM
03-03-2003 09:50 AM
Re: How can I get the time in seconds from the command line.
#HOUR=`date +%H`
#echo $HOUR
#MINUTES=`date +%M`
#echo $MINUTES
SECONDS=`date +%S`
#echo $SECONDS
-or once sintax -
#date +%H:%M:%S
Rgds.