Le Tuesday 18 November 2008 vers 19:37, giggz(giggz
<[EMAIL PROTECTED]>) a écrit:
> Bonsoir,
Bonsoir,
> clamdscan="/usr/bin/clamdscan"
>
> [ -x $clamdscan ] || exit 0
>
> # See ionice(1)
> if [ -x /usr/bin/ionice ] &&
> /usr/bin/ionice -c3 true 2>/dev/null; then
> IONICE="/usr/bin/ionice -c3"
> fi
----
#Fichier d'état pour déterminer les fichiers modifiés, crées
STATEFILE=/home/giggz/.lastscannedtimestamp
if [ ! -f "$STATEFILE" ] ; then
touch -t -t 190201010000 $STATEFILE #création du fichier d'état
avec en date de 01/01/1902
fi
touch /tmp/.statefileForNextScan
sync
sleep 10
find /home/giggz/ -type f -newer $STATEFILE | xargs -l1 $IONICE
$clamdscan --no-summary --stdout | grep ' FOUND$'
# Mise à jour fichier pour le prochain scan
touch -r /tmp/.statefileForNextScan $STATEFILE
rm -f /tmp/.statefileForNextScan
--------------
*Normalement*, ce script ne scanera que fichiers modifiés/crées
depuis le scan précédent!
A+
--
http://www.glennie.fr
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.
--
Lisez la FAQ de la liste avant de poser une question :
http://wiki.debian.org/DebFrFrenchLists
Vous pouvez aussi ajouter le mot ``spam'' dans vos champs "From" et
"Reply-To:"
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]