Karl,
# get_total_files_size() { TOTAL=0; for K in $(find $1 -type f -mtime +20 |
xargs du -skc 2>/dev/null |grep total); do TOTAL=$(($TOTAL+$(echo $K|awk
'{print $1}'))); done; echo "Total Filesize (K): $TOTAL"; }
$ get_total_file_size /var/log
Total Filesize (kb): 5712
Regards,
-Urivan Flores-Saaib
==============Original message text===============
On Thu, 29 May 2008 14:18:56 PDT Karl Cunningham wrote:
$ command_xx `find -mtime +20`
I'm looking for command_xx which will give me a sum of the file sizes
for the list of files more than 20 days old (in this case). What might
command_xx be?
tia
Karl Cunningham
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
===========End of original message text===========
Urivan A. Flores Saaib
CiberLinux Networking
Email: [EMAIL PROTECTED]
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list