So I made a boo boo today...
Like a fool I pulled my NTFS external USB drive out of my Ubuntu 10.04 laptop a second too early. I was moving some files from the laptop to the drive and just as the bar was reaching complete I pulled the USB cable out. It was a load of files and folders I had looped and "right clicked > cut". I would have thought that say the last file of the selection wouldn't be there because I interrupted the cut process right at the end but no, all the files aren't on the external drive and because it was a cut not a copy they are gone from my laptop.
Anyone know how I can scan my external drive for the presumably unclosed files and "close them" or something data recovery-esq like that?
On 29/07/11 23:17, James Bensley wrote:
Anyone know how I can scan my external drive for the presumably unclosed files and "close them" or something data recovery-esq like that?
Photorec might do it, the package to install is called testdisk, ignore the photo bit of the name it can recover many file types not just photos. But you will have to scan the free space and recover all files in there which will include previously deleted files etc...so finding the one you want might take some time. Probably wouldn't bother scanning the whole drive, just the free space as that's where the missing file would have been written to, if you scan the whole drive it is going to recover a *lot* of files.
But mostly likely the write was cached and although the cut operation had finished the cached write was still being flushed to disk..So the chances are that even if you recovered the file it will be incomplete.
If you are in the habit of doing this then I would disable write caching for your removable drives, on ubuntu at least there is a GUI way of doing this via the disk manager.