We found that the disk space of the tested server is 100%. Using df-lh and du & ndash; sh, the jenkins log file is located at 363 GB. I found several ways to delete large files on the Internet: 1. low: after rmrm deletes a large file, df & ndash; lh will check whether the disk is still occupied. this is because rm deletes files, and files are generally not immediately written to the disk, that is, the space is not immediately released. Solution
We found that the disk space of the tested server is 100%. Through df-lh and du-sh, the jenkins log file is located at 363 GB. I found several ways to delete large files online:
I. low: rm
After rm deletes a large file, df-lh checks whether the disk is occupied.
This is because rm deletes files, and files are generally not immediately written to the disk, that is, the space is not immediately released.
Solution:
1. restart the server (not recommended );
2. losf | grep deleted; view the deleted process
The process is not closed, so the disk space will not be released. you need to kill-9 PID. after killing the process, the space will be released.
II. input redirection:
The following methods are used to clear the file content, but do not delete the file.
1. echo>/path/to/somefile
2. cat/dev/null>/path/to/somefile
3.>/path/to/somefile
4:>/path/to/somefile