Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I had a pretty scary moment today (reminiscent of the highly illogical MS Word 'can't open file' moments that made me abandon Windows altogether) when a folder I was editing a LaTeX report in simply disappeared!

Here's the system log:

pedro@X230t:~$ cat /var/log/syslog | grep sda1
    Apr 13 13:59:59 X230t kernel: [    1.163585]  sda: sda1 sda2 < sda5 >
    Apr 13 13:59:59 X230t kernel: [    2.133568] EXT4-fs (sda1): mounted filesystem with   ordered data mode. Opts: (null)
    Apr 13 13:59:59 X230t kernel: [   17.023928] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro

I have been googling around about this and eventually found my data in the "trash" folder for reasons completely unknown to me. Even if I had erased the files by mistake, the OS should have complained that I was currently using a given file, right?

Why did this happen? How to prevent it from happening again?

I ran the disk utility and my hard drive seems healthy from the tests there. I also ran sudo badblocks -v /dev/sda1 and got nothing.

Any ideas/tips/commentaries are highly welcomed. Thanks!

share|improve this question
    
Thank you all for your feedback and comentaries. I have not had anymore problems. I am going to guess it was a very bad bug in a program called "KolourPaint". I have since been forcing myself to use GIMP for simple 'paint' tasks and have not see the problem anymore. –  user1485934 Apr 16 at 12:31

2 Answers 2

up vote 0 down vote accepted

In Linux you actually can remove files that are used by an application. In that case the folder entry gets removed immediately so you can't see the file any longer but the actual file content only gets freed when the application closes the file.

Files removed by the system or due to hardware bugs usually don't end up in the trash but just disappear. Only if you use some applications like a file manager the file gets moved to the trash. As you found the file in the trash folder you most likely removed it by mistake.

share|improve this answer
    
Thanks for the reply! You calmed me down a bit. Still why was there that syslog message? I just created a random file, erased it and the syslog didn't change :( –  user1485934 Apr 13 at 22:39

This could be the sign of your hard disk is at the end of its life. If possible, try using a new hard disk and see if the problem persist.

Other problems may include such as faulty motherboard, faulty power supply, or loose wire connections. It can be your RAM, but this is quite rare.

share|improve this answer

Your Answer

 
discard

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.