Related
Accidentally deleting a file is a terrible feeling.
Not being able to boot into Windows and undelete that file makes that even worse.
Fortunately, you’re free to recover deleted files on NTFS hard drives from an Ubuntu Live CD.
We then booted up the same machine with the bootable Ubuntu 9.10 USB Flash Drive that wecreated last week.
In the terminal window, punch in in:
sudo fdisk –l
and press enter.
What you’re looking for is a line that ends with HPSF/NTFS (under the heading System).
In our case, the equipment is “/dev/sda1”.
This may be slightly different for you, but it will still begin with /dev/.
Note this rig name.
In the terminal window, bang out:
sudo ntfsundelete
and hit enter.
The percentage in the third column tells us how much of that file can be recovered.
Nevertheless, we have three files that we can recover – two JPGs and an MPG.
Note: ntfsundelete is immediately available in the Ubuntu 9.10 Live CD.
Note that the ntfsundelete program does not make any changes to the original NTFS hard drive.
We have one more file to undelete – our MPG.
Note the first column on the far left.
It contains a number, its Inode.
Think of this as the file’s unique identifier.
All three of our recoverable files are now recovered.
However, Ubuntu lets us know visually that we can’t use these files yet.
sudo chown ubuntu *
The files now look normal, and we can do whatever we want with them.