Solution to insufficient disk space in linux

王林
Release: 2019-12-25 17:19:02
Original
3589 people have browsed it

Solution to insufficient disk space in linux

1. First, determine whether there is insufficient disk space.

Enter the following command to view the disk information:

df –h
Copy after login

Solution to insufficient disk space in linux

## Obviously: the 40G capacity under the mount point /dev/xvda1 under Filesystem has been exhausted.

The easiest way at this time is to find large and useless files and delete them. The first choice is the log file.

Recommended related video tutorials:

linux video tutorial

2. Enter the following command to find the current directory and which folder takes up the most space

du -h --max-depth=1
Copy after login

Solution to insufficient disk space in linux

3. Enter the logs folder

Enter the following command to display the files in order from large to small

ls –lhS
Copy after login

Solution to insufficient disk space in linux

Enter the following command Complete cleanup.

> ./catalina.out
Copy after login

Solution to insufficient disk space in linux

Note: If the process is in use when clearing the log, an error will be reported when using rm -f to delete, or the disk will still be full even if it is deleted, so Using the command to clear the contents of the log file is better than deleting this file.

Recommended related articles and tutorials:

linux tutorial

The above is the detailed content of Solution to insufficient disk space in linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!