0

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.

ServerDown
  • 372
  • 1
  • 2
  • 9

1 Answers1

5

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.

Clinton Pierce
  • 186
  • 2
  • 10
  • 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