Inhaltsverzeichnis

Tips und Tricks rund um den find Befehl

find files älter und addiere die Größe

find . -type f -mtime +90 -printf '%s\n' | awk '{total=total+$1}END{print total/1e+9}'

Gigabyte

find . -type f -mtime +90 -printf '%s\n' | awk '{total=total+$1}END{print total/1e+6}'

Megabyte

xarg in Kombination mit find

find . -name "*.tmp" -print0 | xargs -0 rm

find mit Regex und addieren der Größe

find /srv/nextcloud/data/marko/ -type f -regextype egrep -regex '.*\.(pdf|odt)' -printf '%s\n' | awk '{total=total+$1}END{print total/1e+9}'