LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   My code deleted itself on Ubuntu Karmic (https://www.linuxquestions.org/questions/linux-newbie-8/my-code-deleted-itself-on-ubuntu-karmic-825586/)

ibwood 08-11-2010 11:48 AM

My code deleted itself on Ubuntu Karmic
 
I honestly don't know what happened. I just checked the folder that the code was normally in and it's gone :( I don't have it backed up either. Is there any way I can get it back??

r3sistance 08-11-2010 11:57 AM

It might be the inode corrupted, try doing an "ls -a" you might get lucky and there is a .lost and found directory in place in this instance... else I would not know how to recover the inode... if this is what has occurred as I suspect. If there are other inode references to it they might be able to get you back to the code (ie a hard link)

ibwood 08-11-2010 12:11 PM

I was able to get it back. I had no luck with "ls -a" but fortunately there was a hidden file in the same directory (a backup from saving) that I was able to restore :) what a relief! Thanks for responding and trying to help r3sistance.

So, if you somehow find that your files randomly disappear, look under the "view" menu and click "Show hidden Files". There should be a backup file that has the same name (only differs by a "~" symbol at the very end). Simply rename the file and delete the "~".

-Ian

r3sistance 08-11-2010 12:18 PM

I believe this tends to be something some GUI tools do, command line tools like nano and vi I am fairly sure don't do this. So you were saved by GUI tools. If something is important to you, back it up. store it on a USB Disc, upload it to a storage service... just keep more then one copy of it. As you are saying you code, maybe you should consider a form of revision control.


All times are GMT -5. The time now is 02:53 AM.