Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 16066  / 2 Years ago, mon, august 8, 2022, 10:47:25

I have an unsaved document opened in gedit on Xubuntu 13.10. A bug caused gedit's main window to disappear and only the title bar is still visible, reading "Untitled Document 1".



Is there a way to recover the typed text from the running but defunct session of gedit? Are "Untitled Documents" stored somewhere temporarily?


More From » xubuntu

 Answers
4

The file only seemed to be stored in RAM. All attempts to find it on disk returned nothing. Here's what I did for partial recovery:




  1. Find out PID and write it down



    ps -ef | grep gedit

  2. Use it to dump memory of process



    sudo gcore 12345

  3. Use vim and search for keywords you remember



    sudo vim core.12345



The entire file will be fragmented, can be quite big and is littered with parts you have deleted already. Since I was not programming, but wrote an actual text, I was able to find the individual fragments and recover a large part of the text.



Ironically, after I went through all of this work and wanted to close the gedit instance it asked me if I want to save the Untitled Document 1 - which I did.


[#26461] Wednesday, August 10, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
musining

Total Points: 171
Total Questions: 124
Total Answers: 121

Location: Zambia
Member since Thu, Jun 25, 2020
4 Years ago
;