At times we have certain files which grow mammoth in size with time, like with RoR applications, there are log files, residing in the
We can clear up the files using the below command in a single line.
for i in *.log; do cat /dev/null > $i; done
Of-course you should have a backup copy of these logs in
logstash or somewhere, and I am assuming you have provisioned for the same. I am writing up a short post on how I have done that, you can follow that incase you haven't put those services in place already.