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 was reinstalling Ubuntu yesterday. While doing so I was looking through my backup copy and accidentally pressed "delete" on one of the folders in the archive.. The computer worked a few hours and then returned error message: file does not exist. when I looked in the drive, my files were gone! The tricky part of the whole thing is this though: even though I can't see the file, it's still taking up space on my external drive, according to gparted. Any idea how to save my data?

share|improve this question
add comment

2 Answers 2

Never mind. I activated "view hidden files" ctrl+h. Here I found 2 folders. One of them contained the backup file. Not strange when I think about it. the files got "deleted" with a 4gb usb stick. no way the files would fit in that trash can. :)

Case closed.

share|improve this answer
add comment

Ubuntu uses a "Recycle Bin" as well (called Trash). It stored in a hidden folder called .Trash on the root of the drive. To restore the files, go to the Trash icon on the Ubuntu Desktop and restore them from there. This is probably why it's still taking up space. If that's not the issued, try below.

File recovery on Ext filesystems is not as easy as in FAT/NTFS systems, you'll need to do a low-level scan of the drive to get the data back. A good tool for this is scalpel as long as it's not something like LZMA data that doesn't have magic numbers. Scalpel reads the drive sector by sector and checks for magic numbers. If it finds one that it recognizes from the scalpel.conf, it extracts it and moves it. However, you'll probably need to hex edit the output to get it back to its original size.

share|improve this answer
add comment

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.