09-25-2006
Can you help me searching for it??
i cant find it in the forum. thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. Solaris
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
3. Shell Programming and Scripting
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
4. AIX
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
5. Shell Programming and Scripting
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
6. Linux
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
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
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
9. UNIX for Dummies Questions & Answers
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
10. Programming
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
STAT(3) 1 STAT(3)
stat - Gives information about a file
SYNOPSIS
array stat (string $filename)
DESCRIPTION
Gathers the statistics of the file named by $filename. If $filename is a symbolic link, statistics are from the file itself, not the sym-
link.
lstat(3) is identical to stat(3) except it would instead be based off the symlinks status.
PARAMETERS
o $filename
- Path to the file.
RETURN VALUES
stat(3) and fstat(3) result format
+--------+--------------------------------------+---+
|Numeric | | |
| | | |
| | Associative | |
| | | |
| | Description | |
| | | |
+--------+--------------------------------------+---+
| 0 | | |
| | | |
| | dev | |
| | | |
| | device number | |
| | | |
| 1 | | |
| | | |
| | ino | |
| | | |
| | inode number * | |
| | | |
| 2 | | |
| | | |
| | mode | |
| | | |
| | inode protection mode | |
| | | |
| 3 | | |
| | | |
| | nlink | |
| | | |
| | number of links | |
| | | |
| 4 | | |
| | | |
| | uid | |
| | | |
| | userid of owner * | |
| | | |
| 5 | | |
| | | |
| | gid | |
| | | |
| | groupid of owner * | |
| | | |
| 6 | | |
| | | |
| | rdev | |
| | | |
| | device type, if inode device | |
| | | |
| 7 | | |
| | | |
| | size | |
| | | |
| | size in bytes | |
| | | |
| 8 | | |
| | | |
| | atime | |
| | | |
| | time of last access (Unix timestamp) | |
| | | |
| 9 | | |
| | | |
| | mtime | |
| | | |
| | time of last modification (Unix | |
| | timestamp) | |
| | | |
| 10 | | |
| | | |
| | ctime | |
| | | |
| | time of last inode change (Unix | |
| | timestamp) | |
| | | |
| 11 | | |
| | | |
| | blksize | |
| | | |
| | blocksize of filesystem IO ** | |
| | | |
| 12 | | |
| | | |
| | blocks | |
| | | |
| | number of 512-byte blocks allocated | |
| | ** | |
| | | |
+--------+--------------------------------------+---+
* On Windows this will always be 0.
** Only valid on systems supporting the st_blksize type - other systems (e.g. Windows) return -1.
In case of error, stat(3) returns FALSE.
Note
Because PHP's integer type is signed and many platforms use 32bit integers, some filesystem functions may return unexpected results
for files which are larger than 2GB.
ERRORS
/EXCEPTIONS
Upon failure, an E_WARNING is emitted.
EXAMPLES
Example #1
stat(3) example
<?php
/* Get file stat */
$stat = stat('C:phpphp.exe');
/*
* Print file access time, this is the same
* as calling fileatime()
*/
echo 'Access time: ' . $stat['atime'];
/*
* Print file modification time, this is the
* same as calling filemtime()
*/
echo 'Modification time: ' . $stat['mtime'];
/* Print the device number */
echo 'Device number: ' . $stat['dev'];
?>
Example #2
Using stat(3) information together with touch(3)
<?php
/* Get file stat */
$stat = stat('C:phpphp.exe');
/* Did we failed to get stat information? */
if (!$stat) {
echo 'stat() call failed...';
} else {
/*
* We want the access time to be 1 week
* after the current access time.
*/
$atime = $stat['atime'] + 604800;
/* Touch the file */
if (!touch('some_file.txt', time(), $atime)) {
echo 'Failed to touch file...';
} else {
echo 'touch() returned success...';
}
}
?>
NOTES
Note
Note that time resolution may differ from one file system to another.
Note
The results of this function are cached. See clearstatcache(3) for more details.
Tip
As of PHP 5.0.0, this function can also be used with some URL wrappers. Refer to "Supported Protocols and Wrappers" to determine
which wrappers support stat(3) family of functionality.
SEE ALSO
lstat(3), fstat(3), filemtime(3), filegroup(3).
PHP Documentation Group STAT(3)