Reasons for insufficient Linux space:
1. The disk is full
2. The memory is full
Solution to insufficient disk space:
1. First determine whether there is insufficient disk space.
Enter the command: df –h
View disk information
Obviously: the 40G capacity under the mount point /dev/xvda1 under Filesystem has been exhausted. At this time, the easiest way is to find large and useless files and To delete, the first choice is the log file.
2. Enter the command: du -h --max-depth=1
Find which folder in the current directory takes up the most space
3. Enter the logs folder
Enter the command: ls –lhS
Display the files in order from large to small
Enter Command: > ./catalina.out
Complete the cleanup.
Note: If the process is in use when clearing the log, either an error will be reported when using rm -f to delete, or the disk will still be full even if it is deleted, so use the command to clear the log file contents. Better than deleting this file.
Recommended tutorial: linux tutorial
The above is the detailed content of Insufficient space in linux. For more information, please follow other related articles on the PHP Chinese website!