Sometimes, you would just want to recover a specific file from the partition. This section guides you through on how to recover a particular file using extundelete
.
The first step is to unmount the partition, leaving it to only the device node. This is because extundelete
has a nasty reputation of corrupting the entire partition after its recovery. You should not skip this step. Use lsblk
to identify your target partition.
Once done, create a temporary directory to work and change directory into it.
$ mkdir temp && cd temp
Once you're ready, you may begin the undelete process. Please do keep in mind that it can take hours to recover depending on the age, time, and disk size. The command is:
$ extundelete --restore-file </path/to/file> <partition>
Example:
$ extundelete --restore-file /var/tmp/test.iso /dev/sda4
That's all for recovering specific file using extundelete
.