Deleted, but opened file

It is possible to delete a file that is currently opened by another process. The disk space will not be reclaimed immediately... actually, the "file" could keep growing. This behavior is by designed. Actually, this is the reason why the C function call is named unlink(2) rather that delete!

while sleep 1 ; do date ; done > /tmp/Bzzz &
tail -f /tmp/Bzzz

This script print the current date every second.

Then, you can switch to another terminal, then delete the file:

rm /tmp/Bzzz

As you can notice, the files keeps growing, since the tail keeps printing new lines!

Now...

How how to recover a deleted opened file ?

If you need to undelete an "opened file", you can use this hint (thanks to Mike Hommey for the hint):