Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

After lines of lines i -wrongly- closed the file without saving.Is there any way to rescue that lines(because of close without saving, it is not a file yet.)

Edit : I used Text Editor and it was a text file.I opened the new file to write.

share|improve this question
    
Was this a text file? Ubuntu's 'Text Editor' saves a hidden file by default, and you would need to open Nautilus, go to the directory where the text file was, and press CTRL + H to see the hidden file. –  Tom Brossman Jul 3 '12 at 10:36
    
You should at least specify what application you had it open in. And if you edited an existing file, or tried to create a new one. In the first case (editing an existing file), some editors do auto-save to a (temporary/backup) file, but chances are small you get your "abandoned lines" back. –  Izzy Jul 3 '12 at 10:36

1 Answer 1

If you are real lucky, it might still be in memory:

sudo strings /dev/mem
share|improve this answer
    
I used this command but there aren't my text file.There are a lot of strings but i don't understand any of them. –  myildirim Jul 3 '12 at 10:42
    
Try adding ` | grep "some text"` to the end. Do it fast, and close all unneeded applications to preserve memory. In fact, you might want to dump all the memory to a text file by adding ` > savedMemory.txt` to the end of the command. –  dotancohen Jul 3 '12 at 10:48
    
i changed the output to the file but there are a lot of irrelevant strings that i didn't write. –  myildirim Jul 3 '12 at 10:52
    
Of course, that is a dump of all your memory. Try searching that file to see if any of your lost text is in it. –  dotancohen Jul 3 '12 at 10:57
    
I can not reach any string of my file now i accept that it totally lost.But here is my new question : Can i understand that command's output's meaning ? –  myildirim Jul 3 '12 at 11:02

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.