Command for finding disk usage of error_logs in the home directory

It’s really a headache while handling disk space issues with Linux server. Today I am sharing one of the easiest commands to sort out the size of unwanted logs that can be easily removed from the server to tackle the disk space issue.

root@arunlal [~]# find /home -type f -name error_log -exec du -h {} + | sort -h | tail

11M /home/arun/public_html/error_log
18M /home/firdos/public_html/error_log
31M /home/teddy/public_html/error_log
61M /home/peter/public_html/error_log
62M /home/denny/public_html/error_log
88M /home/evette/public_html/error_log
91M /home/vibin/public_html/error_log
124M /home/virtfs/math/var/log/apache2/error_log
269M /home/virtfs/math/usr/local/cpanel/logs/error_log
286M /home/virtfs/math/usr/local/apache.ea3/logs/error_log

Post navigation

Leave a Reply