Junior — Middle
What causes a situation where deleting logs does not free up the space they occupy?
sobes.tech AI
Answer from AI
Deleting logs does not free up space if log files remain open by processes. In such cases, although the file is removed from the filesystem, the space it occupies is not released until the process closes the file descriptor. To resolve this, you need to restart or signal the process to close and reopen the log file. For example, in Linux, you can use the command lsof | grep deleted to find such files.