Junior — Middle
Why does the command still show the section as filled after data deletion, despite clearing?
sobes.tech AI
Answer from AI
Even after deleting files from a directory, the df command may still show that space is not freed if:
- Files were deleted, but processes still hold open file descriptors to those files. In this case, the data remains on disk until all descriptors are closed.
- Files are in hidden or mounted points that are not directly visible.
To check open files, you can use:
lsof +L1
This will show deleted but still open files. To free space, you need to terminate processes holding them or reboot the system.