Home  |  Linux  | Mysql  | PHP  | XML
From:Jim Gibson Date:Tue Mar 16 21:32:46 2010
Subject:Re: running stats on a file
On 3/16/10 Tue Mar 16, 2010 2:05 PM, "ben perl" <ben.perl3@gmail.com>
scribbled:

> Hi Jim,
>
> Thanks for the reply. This seem to work only if i am running perl on the
> machine itself.
>
> I am instead using expect to ssh into this machine and run stat command and
> use the output from that command to check the output of that stat command.

Then check out the various date/time modules included with Perl or available
on CPAN, including Time::localtime, Time::Local, Date::Calc, DateTime,
and Date::Manip.

Date::Manip in particular has the ParseDate function for return a numerical
time given a string.

You can also do your own parsing of the output of stat, extracting the date
and time fields and using the timelocal or timegm functions of the
Time::Local module to calculate Unix times.


Navigate in group perl.beginners at sever nntp.perl.org
Previous Next


Your recent visits
Re: Any Good SCM tool to manage Perl Code locally
Lingua::Stem 0.83 module installation problem
Replacement in 3GB file
Re: prepare(SELECT ... FROM TABLE) error
Re: 1-line text file with numbers, need to add to them



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants