Recover Deleted Files On Debian And Ubuntu
DOWNLOAD ::: https://fancli.com/2tuZZz
How to Recover Deleted Files on Debian and Ubuntu
Have you ever accidentally deleted a file on your Debian or Ubuntu system and wondered how to get it back If so, you are not alone. Many Linux users have faced this situation and wished they had a way to undo their mistake. Fortunately, there are some tools and methods that can help you recover deleted files on Linux, even if you have emptied the trash or used the rm command.
In this article, we will show you how to recover deleted files on Debian and Ubuntu using two different tools: extundelete and Photorec. We will also explain some tips and precautions to prevent data loss and improve your chances of successful recovery.
What Happens When You Delete a File on Linux
When you delete a file on Linux, it is not actually erased from the disk. Instead, the file system marks the space occupied by the file as free and available for new data. The file itself remains on the disk until it is overwritten by another file or operation. This means that you have a window of opportunity to recover the deleted file, as long as you act quickly and avoid writing any new data to the disk.
However, this also means that the longer you wait, the lower your chances of recovery become. As you use your system, new files and processes may overwrite the deleted file's space and make it unrecoverable. Therefore, it is important to stop using your system as soon as you realize you have deleted a file that you need.
How to Recover Deleted Files on Debian and Ubuntu Using extundelete
extundelete is a tool that can recover deleted files from ext3 and ext4 file systems, which are commonly used on Debian and Ubuntu systems. It works by scanning the journal of the file system and restoring the deleted files based on their inode information. To use extundelete, you need to have root privileges and access to an unmounted partition.
Here are the steps to use extundelete:
Install extundelete from the official repositories or download it from https://extundelete.sourceforge.net/.
Identify the partition where your deleted file was located. You can use the df or lsblk commands to list your partitions and their mount points.
Unmount the partition if it is mounted. You can use the umount command followed by the partition name or mount point.
Run extundelete with the following syntax: sudo extundelete /dev/sdX --restore-file /path/to/file, where /dev/sdX is your partition name and /path/to/file is the relative path of your deleted file from the root of the partition.
If extundelete finds your file, it will restore it to a folder called RECOVERED_FILES in your current directory. You can then move or copy it to another location.
How to Recover Deleted Files on Debian and Ubuntu Using Photorec
Photorec is another tool that can recover deleted files on Linux, regardless of the file system type. It works by scanning the disk for known file signatures and recovering them based on their content. Photorec can recover many types of files, such as images, videos, documents, archives, etc. To use Photorec, you need to have root privileges and access to an unmounted partition.
Here are the steps to use Photorec:
Install Photorec from the official repositories or download it from https://www.cgsecurity.org/wiki/PhotoRec.
Identify the partition where your deleted file was located. You can use the df or lsblk commands to list your partitions and their mount points.
Unmount the partition if it is mounted. You can use the umount command followed by the partition name or mount point.
Run Photorec with sudo privileges: sudo photorec.
Select your partition from the list and press Enter.
Select your partition type (usually Intel) and press Enter.
Select [File Opt] to choose which types of files you want to recover. ec8f644aee