Monthly Archives: December 2010

IP Unique Apache logs

#!/bin/bash FILE=/usr/local/apache/logs/access_log; for ip in `cat $FILE |cut -d ’ ’ -f 1 |sort |uniq`; do { COUNT=`grep ^$ip $FILE |wc -l`; if [[ "$COUNT" -gt "10" ]]; then echo ”$COUNT:   $ip”; fi }; done

Posted in astuces, bash | Leave a comment

Trouver les fichiers plus grand que 10 Mo

find / -size +10000000c -printf “%15s %pn”

Posted in astuces, linux | Leave a comment

Trouver les fichiers modifiés dans les deux jours

find / -mtime 2 -o -ctime 2

Posted in astuces, bash, linux | Leave a comment