From e3b4f2559f0389a04234c424f10dd198664ea143 Mon Sep 17 00:00:00 2001 From: pdiogoantunes Date: Tue, 28 Mar 2017 10:31:21 +0200 Subject: [PATCH] ajout script --- TipsShell.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/TipsShell.md b/TipsShell.md index 4647cf31..351d9e51 100644 --- a/TipsShell.md +++ b/TipsShell.md @@ -189,4 +189,13 @@ TMP=$(mktemp) #compter dans les sous niveaux cat $TMP | (while read line; do num=$(echo $line | awk '{ print $1 }'); path=$(echo $line | awk '{ print $2 }'); echo ${path%/*}; done) | sort | uniq | (while read line; do echo $(grep "$line" $TMP | cut -f1 -d' ' | xargs echo -n | tr -s ' ' '+' | xargs echo | bc -l) $line; done) | sort -n | tee $RESULT_FILE rm $TMP -~~~ \ No newline at end of file +~~~ + +## Supprimer des vieux fichiers + + - + vieux de 30 jours en modification : + +~~~{.bash} +$ find DIR/ -type f -mtime +30 -delete +$ find DIR/ -type f -mtime +30 -exec rm '{}' \; +~~~