Home >Operation and Maintenance >Linux Operation and Maintenance >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## 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: 2. Enter the following command to find the current directory and which folder takes up the most space
du -h --max-depth=13. Enter the logs folderEnter the following command to display the files in order from large to small
ls –lhSEnter the following command Complete cleanup.
> ./catalina.out
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: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!