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

2
  • Have you tired restarting postgres?
    – Gmck
    Mar 17, 2016 at 13:05
  • @gmck I tried executing sudo /etc/init.d/postgresql stop but the file still persists/results still persists
    – KyelJmD
    Mar 17, 2016 at 13:07

2 Answers 2

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.

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .