Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
Linux server out of space

I deleted an open file and the disk usage was not reduced.

Will it free up the space if I deleted the link in /proc/PID/fd/N ? what will happen to the process (in general)?

To be specific: The server is running Zimbra and the sync.log just gone crazily big occasionally (it's Zimbra's bug)

share|improve this question

marked as duplicate by Iain Dec 5 '12 at 6:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

2 Answers

You have a running process writing to the file. You should have truncated or zeroed the logfile instead of deleting it. See the detail and explanation of the process here, but something like : > /path/to/sync.log would work.

At this point, you'll have to restart the Zimbra daemon to realize the newly-freed space.

Obviously, this is treating the symptom, and you'll hopefully have an opportunity to fix this at the Zimbra level.

share|improve this answer
add comment

The better way to delete a file that is being written to is simply cp /dev/null into it

cp /dev/null /path/to/file 
share|improve this answer
    
With usual shells (POSIX sh, bash, ksh, zsh, ...) : > /path/to/file or just > /path/to/file are simpler and strictly equivalent. –  jlliagre Apr 30 '12 at 5:34
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.