coolcommands.com - the search engine for unix sysadmins :: unix commands and scripts
Sunday May 27, 2012


 Home
 Search
 Advanced Search
 Category Search
 Affiliates
 Acknowledgements
 Cool Links

Username

Password

Remember me
Forgot your password?
Create an account

Who's Online
We have 23 guests online

Newest Member

beyondimagem

Hit Counter
9133552 Visitors

cool Statistics
coolcommands:1330
Categories:83
Total queries:595500
Members:16437





Category Search coolcommands.com
Select Category:


coolcommand

tl.pl - perl script to convert date and time to unix timestamp
Description

Here is a small perl script that returns a unix timestamp from a date and time parameter:

#!/usr/bin/perl
#
# Accepts date input as mm/dd/yy hh:mm:ss and returns unix timestamp

use Time::Local;

my $d = $ARGV[0];
my $t = $ARGV[1];

@d = split /\//, $d;
@t = split /:/, $t;

$time = timelocal($t[2], $t[1], $t[0], $d[1], $d[0]-1, $d[2]+2000);

print "$time\n";
Example

tl.pl 10/20/04 23:48:31

Return to search results

Random coolcommands

coolcommand: DB2 - start IBM DB2 instance
Example: db2start
[show me the details]
coolcommand: psrinfo - display information about processors in Sun Solaris
Example: psrinfo 1
[show me the details]
coolcommand: nim - deallocate a resource in a NIM server in IBM AIX
Example: nim -F -o deallocate -a mksysb=aixdb24_mksysb aixrel1
[show me the details]
coolcommand: how to count the number of active connections in Checkpoint Firewall-1
Example: fw tab -t connections -s
[show me the details]

coolcommands.com - the search engine for UNIX sysadmins :: unix commands and scripts



FREE
myPMS

Password
Management
System

by

LVOware.com




Top 5 Submitters

lvo1152
audet37
kah00na32
Mariom24
lebjf00014

Top 5 Searches

Category Solaris49379
Category AIX46267
Category General UNIX43933
solaris22927
aix22116

Terms of Use
Privacy
Contact


 
coolcommands.com © 2012. All Right Reserved.
Programming by PRATTICO Consulting . Hosting by Apricusum