In the foremost manual it says that it can be used to recover files using their headers, footers and data structures. Since file deletion does not actually erase data and data is still there until some other data overwrites it. Hence I tried to recover my video files (mp4 format) just after deleting it (files were in external drive). But it just created the mp4 folder and ran for near about half an hour but couldn't recover even one of the file (there were total of 20 video files).The command I used was:foremost -t mp4 .I ran it inside the directory where the files were already present.How can I recover those files? Any other effective method would also be encouraged.
Recover deleted files using foremost
data recovery
foremost needs access to the device containing the files, not the directory where it is mounted. In your case, assuming your external drive (and appropriate partition) ends up being /dev/sdc1, you'd make sure it's unmounted and runforemost -t mp4 /dev/sdc1You need to run this from a directory with enough room to store the recovered files.Since it's a NTFS filesystem, you could try ntfsundelete instead (in the ntfs-3g package usually).