2 ##############################################
3 # Script for Secure Linux Project #
4 # Copyright(c) 2005, 2006 by Roland Haeder #
5 ##############################################
6 # Purpose: Determines sizes of single files #
7 # or of a whole bunch of files in a #
9 ##############################################
10 # This software is licensed under the GNU #
11 # General Public License Version 2 or either #
12 # and comes with ABSOLUTELY NO WARRANTY #
13 # neither implied nor explicit. #
14 ##############################################
16 if test "$1" == ""; then
17 echo "$0: No directory provided for scanning!"
23 # use only first entry
24 DIR=`echo $DIR | cut -f 1 -d " "`
25 echo -n "$0: Reading sizes in /$DIR ... "
26 SIZES=`find $DIR -exec stat --format="%s" {} \;`
30 echo -n "$0: Calculating... "
32 TOTAL="$(($TOTAL + $si))"
37 echo "Total size: $(($TOTAL/1024/1024/1024)) GByte"