Ubuntu server disk usage

Overtime web servers fill up with "stuff", whether than be application files, uploaded content, backups, log files or OS images. It's important to keep ontop of these to avoid your server crashing or grinding to a halt. These two command are very helpful to review disk usage:

df -h and du -hsc *

Here's a quick command to delete old nginx log files, older than 5 days.

find /var/log/nginx -type f -mtime +5 -delete

Contact us on [phone_number] if you need your website and web server maintained.


Explore our projects