1

I was editing a .py file and I had saved it. The power cable was then pulled out of the pi, about 30 seconds after. When I restarted the pi, the file was still there, but the contents was empty (0 bytes). Is there a way to recover this file?

0

1 Answer 1

1

in linux 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.

also in linux this is a question like this that had been answered ! https://askubuntu.com/questions/50678/how-i-can-recover-a-previous-version-of-a-file

and for windows you can see this : https://superuser.com/questions/515906/is-there-any-way-to-restore-recover-a-file-that-was-saved-over-to-its-last-versi

Not the answer you're looking for? Browse other questions tagged or ask your own question.