0

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

KyelJmD
  • 101
  • 1
  • 3

2 Answers2

2

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.

Mike
  • 22,310
  • 7
  • 56
  • 79
1

If this is not a production system, just restart/kill postgres.

I'll check later for your answer, because there's a way to empty these files if you can't restart the application right now and you REALLY need the disk space urgently, but I wouldn't recommend it from the start.

runyoufreak
  • 184
  • 1
  • 6