ajout script
This commit is contained in:
parent
d3a7105617
commit
e3b4f2559f
|
@ -190,3 +190,12 @@ TMP=$(mktemp)
|
||||||
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
|
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
|
rm $TMP
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
## 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 '{}' \;
|
||||||
|
~~~
|
||||||
|
|
Loading…
Reference in a new issue