Tag Archives: system administration

emptying huge log files with `find`

this will list the files:
find /var/log/ -name "*.log*" -size +10000000c -type f -exec ls -lh {} \;

this will empty the files:
find /var/log/ -name "*.log*" -size +10000000c -type f -exec sh -c '> $1' -- {} \;