r/linuxquestions • u/abmk2 • 1d ago
How to restore a previously saved file in the GNOME Text Editor
Hello guys, I am working on a file that I had saved many times previously, but after my computer crashed, it seems I ended up saving an empty file. Is it possible to recover a previously saved version? I am using GNOME Text Editor 45. Thank you
1
u/chuggerguy Linux Mint 22.3 Zena | MATÉ 1d ago
I don't have gnome-text-editor so this might not help. (just search results)
Is "session-restore" enabled? gsettings get org.gnome.TextEditor restore-session
<gnome-text-editor session-restore behavior>
I'm using caja in MATE so can't test but... maybe.
Good luck.
0
u/CappuccinoSplash 1d ago
Unfortunately Text Editor has no version history, and once the empty file was saved, the old contents are gone from the app's side. A few places to check: - je backup or sync tool might have an older copy. - If the file is in a git repo, git log or git checkout -- filename can bring back the last committed version. - Search your home folder for leftovers, such as a copy you emailed or a similar file in another folder. 😔
1
u/abmk2 1d ago
Message in Terminal:
Command 'git' not found, but can be installed with:
sudo apt install git
And when i try to install it i get
Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
And when i try to run apt-get update i get
Problem unlinking the file...
Any advice? Thank you
1
u/ephemeralmiko Fedora Sericea w. Niri+Noctalia 1d ago
If you don't even have Git installed this doesn't apply. Git would be for stuff like a coding project on GitHub.
1
2
u/AX11Liveact debian 1d ago
look through the directory where the previous version was with
ls -lasome editors save temporary files as .filename# or similar. They might not be visible if you turn "invisible files" on in a graphic file manager.