Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 2 down vote accepted

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.

share|improve this answer
thanks, i hope that the hard disk problem is not too bad, will it grow or get worse, should I be worried? – Vass Dec 7 '10 at 19:49
@Vass: The filesystem was made read-only due to a disk error. Look in /var/log/kern.log for disk error messages (more info: superuser.com/questions/207100/207248#207248). You can partially assess your hard drive's health with smartctl (more info: 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 Dec 7 '10 at 21:16
@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. – Maciej Piechotka Dec 7 '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 8 '10 at 1:09
matlab is code right... go git + github.com ftw? – xenoterracide Dec 8 '10 at 2:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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