Fli
10-15-2018, 03:29 PM
df -h
find device which contains deleted files needed to be recovered/restored/undeleted.
For example it is my external drive (formated under MS Windows as a NTFS) /media/me/DATA which has drive path /dev/sdb1
Now i need to go to a drive which is different from one from which i need to recover files. so i go to my home directory, because it is on a system drive, not on external drive where i deleted the data.
cd /home/me
Now i make new directory for recovered files and go to it:
mkdir recovery;cd recovery
Now i unmount my external drive (in my case /dev/sdb1) from which i need to recover some recently deleted files
umount /dev/sdb1
Now i list deleted files which match certain phrase from my external drive /dev/sdb1 i just unmounted
sudo ntfsundelete -m *PartialNameOfDeletedFile* /dev/sdb1
Good, it found some files and they seem to be 100% recoverable so i do:
sudo ntfsundelete -u -m *osudu* /dev/sdb1
which create/recover the files into the current directory.
ls -l
then i change ownership back from root to my username (me):
sudo chown me:me *PartialNameOfDeletedFile*
Then i mount the drive (mount /dev/sdb1) back and move restored files to its original/previous location.
find device which contains deleted files needed to be recovered/restored/undeleted.
For example it is my external drive (formated under MS Windows as a NTFS) /media/me/DATA which has drive path /dev/sdb1
Now i need to go to a drive which is different from one from which i need to recover files. so i go to my home directory, because it is on a system drive, not on external drive where i deleted the data.
cd /home/me
Now i make new directory for recovered files and go to it:
mkdir recovery;cd recovery
Now i unmount my external drive (in my case /dev/sdb1) from which i need to recover some recently deleted files
umount /dev/sdb1
Now i list deleted files which match certain phrase from my external drive /dev/sdb1 i just unmounted
sudo ntfsundelete -m *PartialNameOfDeletedFile* /dev/sdb1
Good, it found some files and they seem to be 100% recoverable so i do:
sudo ntfsundelete -u -m *osudu* /dev/sdb1
which create/recover the files into the current directory.
ls -l
then i change ownership back from root to my username (me):
sudo chown me:me *PartialNameOfDeletedFile*
Then i mount the drive (mount /dev/sdb1) back and move restored files to its original/previous location.