Hi all,
I want to create column names in a flat file and then load the data through some other application. For example, I have a file with emp.txt and I need column names as eno,ename,sal in the first line. The delimiter here is comma and record delimiter is end of line or unix new line. Could... (1 Reply)
Hi all,
I want to calculate the standard deviation for a column (happens to be column 3).
Does any know of simple awk script to do this?
Thanks (1 Reply)
Hey,
I have a file with following data..
and I want to get the summation of 10th column. And this happens in every 10 seconds for a minute max.
242001 A mqsitst 794864 1249516 0 60 20 293050400 77016 * 02:05:33 - 0:04 DataFlowEngine EAITIBR2_BROKER... (6 Replies)
I have around 1000 files in a directory (file1.txt, file2.txt, ... file1000.txt), each file is 2 columns, the first colums are same for all of them, second one is different.
file1.txt
1 10
2 20
3 30
4 40
5 50
file2.txt
1 100
2 400
3 500
4 600
5 900
what I need is , I want... (3 Replies)
Hello Guys
Please find my below requirement
I have a flat file with column headers in first line and data
The structure like below
col1 col2 col3
A 1 2
B 3 4
C 5 6
Say I have to take the summation of col2 (that will depend on the... (2 Replies)
How to Calculating space used in GB for any particular directory in unix
Currently I am using : df -h which gives me space for each mout point
ldndyn1:/vol/v01/dyn/sbcexp/dyn
1.1T 999G 29G 98% /sbcimp/dyn
but I need for some internal particular directory... (3 Replies)
Hi expert,
Is there any fastest way to calculate recursive directory, and I have total 600 directories have 100000 files and 10 directory approximately 9000000 - 10000000 each files per directory. currently using this command "du -k --max-depth=0" to get the size but very slow it take 24 hours... (9 Replies)
I have three folders named f1, f2 and f3. The file names are same in all these folders. I would like to get the summation of the second column from all files. How can I do this ?
file1 in f1 folder
143 143.69 60.2 81.30 40.4 62.39 166.3 83.38 107.2 60.30 37.5
144 192.62 107.9... (3 Replies)
Hi All ,
I am having an input file as stated below
Input file
6 ddk/djhdj/djhdj/Q 10 0.5
dhd/jdjd.djd.nd/QB 01 0.5
hdhd/jd/jd/jdj/Q 10 0.5
512 hd/hdh/gdh/Q 01 0.5
jdjd/jd/ud/j/QB 10 0.5
HD/jsj/djd/Q 01 0.5
71 hdh/jjd/dj/jd/Q 10 0.5
... (5 Replies)
Discussion started by: kshitij
5 Replies
LEARN ABOUT PHP
lstat
LSTAT(3) 1 LSTAT(3)lstat - Gives information about a file or symbolic linkSYNOPSIS
array lstat (string $filename)
DESCRIPTION
Gathers the statistics of the file or symbolic link named by $filename.
PARAMETERS
o $filename
- Path to a file or a symbolic link.
RETURN VALUES
See the manual page for stat(3) for information on the structure of the array that lstat(3) returns. This function is identical to the
stat(3) function except that if the $filename parameter is a symbolic link, the status of the symbolic link is returned, not the status of
the file pointed to by the symbolic link.
EXAMPLES
Example #1
Comparison of stat(3) and lstat(3)
<?php
symlink('uploads.php', 'uploads');
// Contrast information for uploads.php and uploads
array_diff(stat('uploads'), lstat('uploads'));
?>
The above example will output something similar to:
Information that differs between the two files.
Array
(
[ino] => 97236376
[mode] => 33188
[size] => 34
[atime] => 1223580003
[mtime] => 1223581848
[ctime] => 1223581848
[blocks] => 8
)
ERRORS /EXCEPTIONS
Upon failure, an E_WARNING is emitted.
NOTES
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 stat(3).
PHP Documentation Group LSTAT(3)