Skip to main content

Posts

Showing posts from February, 2021

Linux deleted log file doesn't free up the disk space

TL DR; Kill or restart the process which writes the log file. Even though the file is deleted, it won't free up the disk space if the process is still writing to the log file. Only after stopping the process, it will actually be deleted. ---------------------------------------------------------------------------------------- Usually, disk spaces of servers are getting cluttered and filled by application log files when a proper log rotation mechanism is not implemented.  In case if you find such a log file causing the disk space to fill up 100%, it will probably impact any application which trying to use the disk.  You can see the disk space by the following command. df -h If the root dir ("/") usage is 100% the impact may be high for the system. Or else, if there is more than one disk attached then any application that uses that disk can be impacted.  In the above image, mine is not filled yet. I have only used 25% of the disk. How to find what files are using the disk sp