Is there a way to recover a file that I have deleted but is still open somewhere?
- by George Edison
This question is related to How to recover deleted files? but it is slightly different in nature.
Suppose I have a file named ~/something open in a text editor. Further suppose that I open a terminal and run the following command while the file is still open in the text editor:
rm ~/something
This will delete the file. Now suppose that I changed my mind and wanted to get the file back. The file is still open in the text editor, so it hasn't been removed from the disk or filesystem yet.
Is there any way to recover it?