---
title: "Diskspace Check and Fix"
author: "sillycat"
date: "2020-04-01T00:28:37Z"
tags: []
categories: ["企业架构"]
slug: "diskspace-check-and-fix"
draft: false
lastmod: "2020-04-01T00:28:37Z"
id: 2513337
url: "https://sillycat.iteye.com/blog/2513337"
---

Diskspace Check and Fix

First command to check the diskspace and diskusage
> df -lh

Search by directories to see what are the usage on machines
> du -sh /*
> du -sh /var/*

In my case, I get a huge file in the maxscale.log, but I already delete that, but the diskspace is not released. So what I am doing next:
Kill the maxscale process and restart it, it works. The disk is clear after that.

References:
https://serverfault.com/questions/232525/df-in-linux-not-showing-correct-free-space-after-file-removal/232526
https://www.linux.com/training-tutorials/6how-check-disk-space-linux-command-line/