????
Current Path : /proc/322176/root/nutscripts/ |
Current File : //proc/322176/root/nutscripts/teststorage |
#!/bin/bash fecha=$(date) server=$(hostname | awk {'printf $1'}) if [ -d /home ]; then cd / du -h --max-depth=1 /home | grep G | egrep -v 1,0G | grep -v 1.1G | grep -v 1.2G | grep -v 1.3G | grep -v 1.4G | grep -v 1.5G | grep -v 1.6G | grep -v 1.7G | grep -v 1.8G | grep -v 1.9G > /var/log/nutstorage/archivo fi if [ -d /home2 ]; then cd / du -h --max-depth=1 /home2 | grep G | egrep -v 1,0G | grep -v 1.1G | grep -v 1.2G | grep -v 1.3G | grep -v 1.4G | grep -v 1.5G | grep -v 1.6G | grep -v 1.7G | grep -v 1.8G | grep -v 1.9G >> /var/log/nutstorage/archivo fi if [ -d /home3 ]; then cd / du -h --max-depth=1 /home3 | grep G | egrep -v 1,0G | grep -v 1.1G | grep -v 1.2G | grep -v 1.3G | grep -v 1.4G | grep -v 1.5G | grep -v 1.6G | grep -v 1.7G | grep -v 1.8G | grep -v 1.9G >> /var/log/nutstorage/archivo fi if [ -d /home4 ]; then cd / du -h --max-depth=1 /home4 | grep G | egrep -v 1,0G | grep -v 1.1G | grep -v 1.2G | grep -v 1.3G | grep -v 1.4G | grep -v 1.5G | grep -v 1.6G | grep -v 1.7G | grep -v 1.8G | grep -v 1.9G >> /var/log/nutstorage/archivo fi cat /var/log/nutstorage/archivo | grep "/home./" > /var/log/nutstorage/archivo2 cat /home/archivo2 | sort -nr > /home/archivo3 df -h > /home/prueba echo "==============================================" >> /var/log/nutstorage/prueba echo "==============================================" >> /var/log/nutstorage/prueba while read line do echo "=======================================================" >> /home/prueba echo $line >> /var/log/nutstorage/prueba var=$(echo "USUARIO: $line" | awk {'print $3'}) echo "-----------ARCHIVOS MAS DE 100MB----------------------------" >> /var/log/nutstorage/prueba find $var -size +100M >> /var/log/nutstorage/prueba echo "-----------------DIRECTORIOS PESADOS---------------------" >> /var/log/nutstorage/prueba du -h --max-depth=4 $var | grep G >> /var/log/nutstorage/prueba echo "---------------ARCHIVOS PROHIBIDOS-----------------" >> /var/log/nutstorage/prueba find $var -name *.mp3 -exec ls -lah {} \; >> /var/log/nutstorage/prueba find $var -name *.mp4 -exec ls -lah {} \; >> /var/log/nutstorage/prueba find $var -name *.avi -exec ls -lah {} \; >> /var/log/nutstorage/prueba find $var -name *.flv -exec ls -lah {} \; >> /var/log/nutstorage/prueba find $var -name *.wma -exec ls -lah {} \; >> /var/log/nutstorage/prueba find $var -name *.wmv -exec ls -lah {} \; >> /var/log/nutstorage/prueba find $var -name *.mov -exec ls -lah {} \; >> /var/log/nutstorage/prueba find $var -name *.zip -exec ls -lah {} \; >> /var/log/nutstorage/prueba find $var -name *.rar -exec ls -lah {} \; >> /var/log/nutstorage/prueba find $var -name *.iso -exec ls -lah {} \; >> /var/log/nutstorage/prueba find $var -name core.* -exec ls -lah {} \; >> /var/log/nutstorage/prueba echo "=======================================================" >> /var/log/nutstorage/prueba done < /var/log/nutstorage/archivo3