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.

I was doing a big backup of 10GB text files to ZIP and then had to stop the ZIP creation half way through. I then discovered that although Control+Z stopped the ZIP fine BUT the space is lost.

I the temp filename like Zskhdj4d using the rm command BUT the available disk space is still reduced.

How do I get this back?

Thanks.

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

Control-Z likely suspended the ZIP creation. The process is still "running" out there, and has a handle to the data. As long as the file exists and/or someone has it open the space will remain used.

You'll have to kill the process (ps, kill, etc..) or bring it to the foreground again and stop it with Control-C (depends on your shell). Then deleting the file will free the space.

share|improve this answer
1  
The lsof command may also be useful, especially if you know the file that is growing, but not the process that is growing it. As mentioned, finding the process that still has it open and terminating that is the answer. If you are in the same terminal "fg" will bring the command to the foreground and you can then CTRL-C to kill it. Otherwise you'll have to find the process and kill it. Rebooting will also fix it, but there are plenty of non-disruptive options to handling this situation. –  Alex Sep 30 '09 at 18:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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