Find out how much space is occupied by your logfiles. Usefull in /var/log et al.
find . -type f -name “*.log” -size +2048 -exec du -s {} \; | awk ‘{ SUM += $1; } END { print SUM/1024/1024 }’
“When the power of love overcomes the love of power, the world will know peace.” – Sri Chinmoy Ghose
haidi@haidi:~/$ find . -type f -name “*.log” -size +2048 -exec du -s {} \; | awk ‘{ SUM += $1; } END { print SUM/1024/1024 }’
–> bash: syntax error near unexpected token `}’
Bei mir sagt er
bash: syntax error near unexpected token `}’
Gruß,
C.
syntax error near unexpected token happens because when copying and pasting the example, the curly single quotes are translated to full stops – it would be better if the examples contained straight quotes