#!/bin/sh # Author: Oliver Ladner # License: LGPL # # Find and report big files MIN_SIZE="$1M" DIRS="/usr /home /etc /bin /var /sbin /tmp" EXCLUDE="" # df DF=$(df -h) if [ ! $1 ]; then echo "Usage: $0 " exit 1 else DO_IT=`find $DIRS -size +$MIN_SIZE -print -exec ls -lha {} \; | grep -v '$EXCLUDE' | awk {'print $5"\t"$6" "$7" "$8'}` LOL=`echo $DO_IT | wc -l` if [ "$LOL" -gt "0" ]; then echo "$DO_IT" fi fi