Linux
#!/usr/bin/perl
$listofcores
=
"listofcores"
;
open
(
CORES,
$listofcores
)
;
while
(
<CORES>
)
{
chop
;
(
$dev
,
$ino
,
$mode
,
$nlink
,
$uid
,
$gid
,
$rdev
,
$size
,
$atime
,
$mtime
,
$ctime
,
$blksize
,
$blocks
)
=
stat
(
$_
)
;
$total
=
$total
+
$size
;
print
"$_ is $size owned by $uid $ctime $mtime $atime
\n
"
;
}
print
"TOTAL disk consumed by cores = $total"
;
exit
;
Photographs that appear on this site may not be reproduced in any form without the express permission of the author.
All photographs Copyright © 1999-2001 by Ian M. Hayhurst - All Rights Reserved.