[SunHELP] Any script to get the total size of a list of file?
Will Mc Donald
wmcdonald at orctel.co.uk
Fri Jan 25 09:45:31 CST 2002
Something like...
find . -type f -ls | awk '{ SUM = SUM + $7 } END { print SUM / 1024 " KB" }'
... assuming your find outputs the size as column 7 (I tested that briefly
on a linux box) and that none of the columns run together.
Or...
find . -type f -ls | awk '{ SUM = SUM + $2 } END { print SUM " KB" }'
Will.
----- Original Message -----
From: "Meng, Andrew" <Andrew.Meng at capitalone.com>
To: <sunhelp at sunhelp.org>
Sent: Friday, January 25, 2002 3:01 PM
Subject: [SunHELP] Any script to get the total size of a list of file?
> Hello,
>
> Can anyone tell me how to get the total size of a list of file(i.e, find
.
> -type f -name "*.c" -print)? Thanks!
>
> Andrew
More information about the SunHELP
mailing list