sudo du -sh /var/log/* | sort -rh | head -10

Category: VPS Management

sudo du -sh /var/log/* | sort -rh | head -10

Find the largest log files

du -sh reports each log's total size in human units; sort -rh orders by size descending; head -10 keeps the top ten. A log that has grown to gigabytes is usually a chatty service or a broken rotation — the fix is usually logrotate config. This is disk-forensics 101 on a full server.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.