I was editing a code in raspberry with the nano editor and I accidentally turned off the raspberry and now when I opened the file, there is nothing, any idea of how to recover the code?
-
what does running "ls -la" in the folder containing the file show for file size? If it appears to still contain code(not 0 bytes) you can "cat filename" to print the file out and see what it contains. If its actually gone, you are probably out of luck.– Chad GApr 24, 2019 at 23:07
-
2Restore the file from your last backup.– IngoApr 25, 2019 at 9:27
1 Answer
You can try looking at the solutions here but they are quite advanced and I would say there's little chance of recovery unless you get quite lucky.
-
Thanks for the answers, sadly I tried them all, but I think I will start rewriting, thanks! Apr 25, 2019 at 20:57