Ubuntu – How to recover a previous version of a file

data-recoveryfilesversions

I modified a .txt file and saved it. When I opened it again, I saw that I deleted one thing from the last version I saved. So I would like to know if I can recover what I deleted?

This file is very important to me. You have to help me! My life is on this file.

I didn't delete anything, I only edited the file. When I tried to save I had get an error saying that it could not read some characters so I closed the editor and when I opened it again some lines just disappeared.

Best Answer

If you used GEdit and you havent disabled the backup function, then there must be a hidden file with name similar to your file but with ~ appended to it. So if your file name is somefile.txt then look for somefile.txt~ in the same directory. This is the backup file and will give you your files state before last save.

Related Question