Ubuntu – How to kill/close log files that are open through lsof grep deleted

greplogginglsofUbuntu

I have a deleted a large log file from our servers. so I executed this command to validate.

lsof -nP | grep '(deleted)'

enter image description here

and this showed up.

how can I permanently delete the results fo this lsof? I need to recliam the needed space on our hardrive

Best Answer

looks like pid 20583 is keeping open the file. So search for it

ps aux | grep 20583

See what process is holding it open and restart the process or kill it.

Related Topic