How to find time


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to find time
# 8  
Old 09-25-2006
Quote:
Originally Posted by dakid
what if i dont have perl?
You can get started with the man page on "stat". That should be all you need.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Find gaps in time data and replace missing time value and column 2 value by interpolation in awk

Dear all, I am kindly seeking assistance on the following issue. I am working with data that is sampled every 0.05 hours (that is 3 minutes intervals) here is a sample data from the file 5.00000 15.5030 5.05000 15.6680 5.10000 16.0100 5.15000 16.3450 5.20000 16.7120 5.25000... (4 Replies)
Discussion started by: malandisa
4 Replies

2. UNIX for Dummies Questions & Answers

Find time difference

I have a file wich contains time formats and i need to get the time difference TIME1 TIME2 =============== =================== 20120624192555.6Z 20120624204006.5Z which means first date 2012/6/24 19:25:55,second date 2012/6/24 20:40:06 so when i get the time... (23 Replies)
Discussion started by: wnaguib
23 Replies

3. Shell Programming and Scripting

How to find time difference?

I have a file wich contains time formats and i need to get the time difference TIME1 TIME2 ================================== 20120624192555.6Z 20120624204006.5Z which means first date 2012/6/24 19:25:55,second date 2012/6/24 20:40:06 so when i get the time... (1 Reply)
Discussion started by: wnaguib
1 Replies

4. Shell Programming and Scripting

what would a script include to find CPU's %system time high and user time high?

Hi , I am trying to :wall: my head while scripting ..I am really new to this stuff , never did it before :( . how to find cpu's system high time and user time high in a script?? thanks , help would be appreciated ! :) (9 Replies)
Discussion started by: sushwey
9 Replies

5. Linux

Find last system shut down time

Hi, I need to find the last system shutdown time. I got a command last that is used for this.But the command is not give the year. Below i posted the sample output last -x |grep shutdown shutdown system down 2.6.31.5-server- Tue Jan 11 11:45 - 11:46 (00:00) shutdown system down ... (6 Replies)
Discussion started by: maruthu
6 Replies

6. Shell Programming and Scripting

Find and Convert UTC Time to PST Time

Hello All - I have a script that grabs data from the net and outputs the following data 46029 46.144 -124.510 2010 07 26 22 50 320 4.0 6.0 2.2 9 6.8 311 1012.1 -0.9 13.3 13.5 13.3 - - 46041 47.353 -124.731 2010 07 26 22 50 250 2.0 3.0 1.6 8 6.4 - 1011.6 - ... (0 Replies)
Discussion started by: drexnefex
0 Replies

7. AIX

How to find time difference between 2 timestamps?

HI All, can some one please help me how to fine the difference between two time stamps say a= Nov 10, 2009 9:21:25 AM b= Nov 10, 2009 10:21:25 AM I want to find difference between the a & b I googled and tried with some options but no luck. My OS is AIX (1 Reply)
Discussion started by: bandlan9
1 Replies

8. Shell Programming and Scripting

how to find the time before 30 minutes

Hi All, I want to find out the time before 30 minutes. I am able to do with in hours limit. date Fri Aug 21 06:50:00 BST 2009 TZ=CST+1 date Fri Aug 21 04:50:02 CST 2009 Can any one please help me (6 Replies)
Discussion started by: vikash_k
6 Replies

9. Solaris

find files by time

I'm working on a SunOS 5.8 box and I have to search recursively in directories matching a certain pattern for files with a .log extension that have changed within the last n-minutes, and than select the least recently used file and open it for reading, preferrably with tail. Does anyone know how I... (3 Replies)
Discussion started by: rein
3 Replies

10. UNIX for Dummies Questions & Answers

Can any how we can find the time diffrence...?

Hi, I am trying to caluate the time elasped by the job to run.For that i have used the following command: I have one file which contains the following more start.txt 991 STARTED Fri Aug 10 14:04:20 2007 Starting Job JOB_NAME. (...) 1036 STARTED Fri Aug 10 14:04:31 2007 ... (1 Reply)
Discussion started by: Amey Joshi
1 Replies
Login or Register to Ask a Question
Net::SFTP::Foreign::Attributes(3pm)			User Contributed Perl Documentation		       Net::SFTP::Foreign::Attributes(3pm)

NAME
Net::SFTP::Foreign::Attributes - File/directory attribute container SYNOPSIS
use Net::SFTP::Foreign; my $a1 = Net::SFTP::Foreign::Attributes->new(); $a1->set_size($size); $a1->set_ugid($uid, $gid); my $a2 = $sftp->stat($file) or die "remote stat command failed: ".$sftp->status; my $size = $a2->size; my $mtime = $a2->mtime; DESCRIPTION
Net::SFTP::Foreign::Attributes encapsulates file/directory attributes for Net::SFTP::Foreign. It also provides serialization and deserialization methods to encode/decode attributes into Net::SFTP::Foreign::Buffer objects. USAGE
Net::SFTP::Foreign::Attributes->new() Returns a new "Net::SFTP::Foreign::Attributes" object. Net::SFTP::Foreign::Attributes->new_from_buffer($buffer) Creates a new attributes object and populates it with information read from $buffer. $attrs->as_buffer Serializes the Attributes object $attrs into a buffer object. $attrs->flags returns the value of the flags field. $attrs->size returns the values of the size field or undef if it is not set. $attrs->uid returns the value of the uid field or undef if it is not set. $attrs->gid returns the value of the gid field or undef if it is not set. $attrs->perm returns the value of the permissions field or undef if it is not set. See also "stat" in perlfunc for instructions on how to process the returned value with the Fcntl module. For instance, the following code checks if some attributes object corresponds to a directory: use Fctnl qw(S_ISDIR); ... if (S_ISDIR($attr->perm)) { # it is a directory! } $attrs->atime returns the value of the atime field or undef if it is not set. $attrs->mtime returns the value of the mtime field or undef if it is not set. %extended = $attr->extended returns the vendor-dependent extended attributes $attrs->set_size($size) sets the value of the size field, or if $size is undef removes the field. The flags field is adjusted accordingly. $attrs->set_perm($perm) sets the value of the permsissions field or removes it if the value is undefined. The flags field is also adjusted. $attr->set_ugid($uid, $gid) sets the values of the uid and gid fields, or removes them if they are undefined values. The flags field is adjusted. This pair of fields can not be set separatelly because they share the same bit on the flags field and so both have to be set or not. $attr->set_amtime($atime, $mtime) sets the values of the atime and mtime fields or remove them if they are undefined values. The flags field is also adjusted. $attr->set_extended(%extended) sets the vendor-dependent extended attributes $attr->append_extended(%more_extended) adds more pairs to the list of vendor-dependent extended attributes COPYRIGHT
Copyright (c) 2006-2008 Salvador Fandin~o. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-05-11 Net::SFTP::Foreign::Attributes(3pm)