Disk Space / Inode Usage

Disk Space Check:

du -hxa --max-depth=1 --exclude=/home/virtfs| awk '{printf "%s %08.2f\t%s\n", index("KMG", substr($1, length($1))), substr($1, 0, length($1) -1), $0}' | sort -r|cut -f2,3

Inode Check:

(icheck=/tmp/inode-check-$(date +"%Y-%m-%d_%H%M%S").txt; echo -e "\n\nDetailed Inode usage: $(pwd)"; for d in `find -maxdepth 1 -type d |cut -d\/ -f2 |grep -xv . |sort`; do c=$(find $d |wc -l); printf "$c\t\t- $(pwd)"/"$d\n" >> $icheck; done; printf "Total: \t\t$(find $(pwd) | wc -l)\n" >> $icheck; sort -nr $icheck; echo -e "\n";rm -f $icheck)

File Changes

Today

find ./ -type f -exec stat --format '%Y :%y %n' "{}" \; | sort -nr | cut -d: -f2- | grep -E $(date +"%Y-%m-%d") | grep -v "sess_"| grep -v "cache/" |grep -v cron