coolcommands.com - the search engine for unix sysadmins :: unix commands and scripts
Wednesday May 22, 2013


 Home
 Search
 Advanced Search
 Category Search
 Affiliates
 Acknowledgements
 Cool Links

Username

Password

Remember me
Forgot your password?

Who's Online
We have 32 guests online

Newest Member

nbewwmbxog

Hit Counter
11556125 Visitors

cool Statistics
coolcommands:1338
Categories:83
Total queries:620226
Members:22813





Search coolcommands.com
Search Keyword:


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: modload - how to load a kernel module in Sun Solaris
Example: modload /usr/kernel/drv/ipf
[show me the details]
coolcommand: lslicense - to display the number of licenses of IBM AIX are available
Example: lslicense
[show me the details]
coolcommand: burn_cd - command to burn a cd
Example: burn_cd -d cd0 iso_image_file
[show me the details]
coolcommand: vxassist - how to create a volume with a mirror in Veritas Volume Manager
Example: vxassist make vg01 50m layout=mirror disk80 disk90
[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

lvo1160
audet37
kah00na32
Mariom24
lebjf00014

Top 5 Searches

Category Solaris51943
Category AIX49010
Category General UNIX47572
solaris23554
aix22739

Terms of Use
Privacy
Contact


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