Today the test server disk space is found to use 100%. by DF-LH and Du–sh, locate the Jenkins log file 363G. Find a few ways to delete large files on the Web:
One, the most Low: RM
After RM deletes large files, DF–LH view will find that the disk is still occupied.
This is because RM deletes the file, and the file is generally not written to disk immediately, i.e. the space is not released immediately.
The way to resolve:
1. Restart the server (preferably not selected);
2.LOSF | grep deleted; View the deleted process
650) this.width=650; "title=" image "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/6F/F9/ Wkiol1wvdrudufdqaaf0pkudlj0839.jpg "" 614 "height=" 188 "/>
Process is not closed, so disk space will not be freed, need kill–9 PID, kill the process, the space will be released.
Second, input redirection:
There are several ways to clear the contents of a file without deleting the file
1. Echo >/path/to/somefile
2. Cat/dev/null >/path/to/somefile
3. >/path/to/somefile
4: >/path/to/somefile
Delete large files under CentOS