3

I am running ubuntu and last week the system didn't let me alter files as if I had no write permissions. Then on reboot the system did a check of the system which took some time. Then everything went normally.

Yesterday I was using matlab. I created 2 function ".m" files, and matlab crashed from an out of memory exception. This morning after checking my computer, I see that 1 of the files is missing, non-existant. What can I do about this? I heard of a folder called yesterday but I can't find it. If there are any other ways this would be great.

Caleb
  • 70,105
Vass
  • 5,371

1 Answers1

3

First of all - you can recover file from backup. Ok. given that you ask your question you don't have backup - but you should.

The second step depends largly on filesystem you are using. If you are using ext2/3(/4?) you are lucky - there is great chance that there is some tool that will recover file - IF data is on disk. Please remember to copy data before using any tool.

Unfortunatly IMHO you have hardware problem with your disk which have bad sectors. You may want to try test disk for bad blocks. Alternativly you may want to look on tools like Spinrite.

PS. I haven't heard of yesterday - only trash and lost+found (the second one is accessable only by root and contains found parts of files - you may have luck). However iI doubt that in yesterday/trash will contain files you are looking for.

  • thanks, i hope that the hard disk problem is not too bad, will it grow or get worse, should I be worried? – Vass Dec 07 '10 at 19:49
  • 1
    @Vass: The filesystem was made read-only due to a disk error. Look in /var/log/kern.log for disk error messages (more info: http://superuser.com/questions/207100/207248#207248). You can partially assess your hard drive's health with smartctl (more info: http://superuser.com/questions/171195). It probably needs changing. If you were thinking of this regarding a “yesterday” directory, that was a site-specific backup setup. – Gilles 'SO- stop being evil' Dec 07 '10 at 21:16
  • 1
    @Vass: Yes, you should. Disks have some amount of spare/redundant blocks it may use if others fail. Anyway - the backup is must-have whatever state of your drive is. – Maja Piechotka Dec 07 '10 at 22:52
  • You should install Dropbox and save all your stuff there. It's a great way to back up to the cloud. – Falmarri Dec 08 '10 at 01:09
  • 1
    matlab is code right... go git + http://github.com ftw? – xenoterracide Dec 08 '10 at 02:04
  • I have poor man solution (I cannot afford cloud solutions) by having 1TB external harddrive and daily dar's of /home LVM snapshot. Sure - it does not protect against fire etc. but at least it protects against hardware failure. – Maja Piechotka Dec 08 '10 at 11:25