How to Recover Permanently Deleted Files in Linux Redhat/Ubuntu/Mint - Qiling  

How to Recover Permanently Deleted Files in Linux Redhat/Ubuntu/Mint


Workable Solutions Step-by-step Troubleshooting
Where Do Deleted Files Go in Linux  In Linux, deleted files are usually sent to the "trash can", a designated folder where they are stored until they are permanently deleted.Full steps
Recover Deleted Files with Qiling Install and Launch Deep Data Recovery > choose "Linux Recovery"...Full steps
Recover with Command Prompt Install the TestDisk software device > recover deleted documents using TestDisk...Full steps

If you've accidentally deleted an important file or folder in Linux, don't worry! This guide will walk you through a simple step-by-step process to recover your data. Many users install Linux without realizing it, and their computer runs smoothly with better battery life and fewer crashes. However, they may accidentally delete files they didn't know were on their system or didn't know how to back up. This guide aims to help you recover your lost files in Linux.

Where Do Deleted Files Go in Linux 

When you delete a file or directory in Linux, it doesn't immediately disappear. Instead, it moves to a temporary location, often the trash or recycle bin, where it remains until it's permanently deleted. This allows for easy recovery of deleted files if needed.

Deleted files and folders can still occupy space on your hard drive, even if they appear "empty", due to various reasons such as corruption, outdated information, sensitivity, or being user-created.

In Linux, deleted files are typically sent to a "trash can" folder, which can be accessed by enabling the hidden folder view option. This folder is available as "TRASH" in the system.

To access the TRASH folder in Linux, you can use the command `cd ~/.local/share/Trash/` in the terminal.

sudo su
cd /.TRASH
ls -l

You can also directly access them by navigating to ~/. local/share/Trash/files/

The files in the recycle bin are not deleted permanently, but they may still be deleted permanently depending on the system configuration.

How to Recover Deleted Files from Ext4 Linux

Learn how to recover deleted files from Ext4 Linux using Qiling data recovery software, which makes it easy to get back your Linux data.

How to Recover Deleted Files in Linux with Data Recovery Software 

Scanning a hard drive for data can be done using various methods and software tools, but the approach depends on the specific situation. Each situation has its unique requirements, which can make the process more complex than necessary.

In Linux, you can restore deleted files or directories using Deep Data Recovery, a software designed to recover all types of data loss, including accidentally deleted files, damage from viruses, and other factors that can lengthen recovery time. With this tool, you can save important documents, pictures, videos, and other valuable information from being lost forever.

Qiling is compatible with Linux in all versions, including MX Linux, Manjaro, Linux Mint, Ubuntu, Debian, etc. It allows users to recover deleted files from a Linux drive connected to a Windows PC.

Here is the list of things you can recover using Deep Data Recovery:

You can download Qiling to take advantage of its features and recover your lost files for free. With Qiling, you can access free recovery from various data loss situations and preview your files before recovery. To recover your deleted files in Linux, follow these steps and use the Qiling Data Recovery software.

Note: The latest version of Deep Data Recovery includes a new feature called Linux Recovery. To access it, users can contact the online customer service to obtain the installation package.

Step 1.To start the recovery process, install and launch Deep Data Recovery on your Windows PC, then select "Linux Recovery" from the left panel.

Select file types that you want to recover

Step 2.This software automatically detects your IP and Port, and you'll need to input your user name and password. If the detected IP address or Port is incorrect, you can manually correct it. Once you've entered the required information, click "Connect Now" to proceed.

select a location and click scan

Step 3. After connecting to the Linux device, Qiling recovery software will scan the disk to find lost and deleted files, and then filter the results by file type.

recover and repair corrupted files

Step 4.To recover lost files in Linux, first preview the scanned files, then select the target data and click the "Recover" button. This will restore the lost files.

How to Recover Deleted Files in Linux Using Command Prompt

The lsof command can help recover a deleted document by creating a duplicate of the report before it is closed, as it remains open in the application after accidental deletion.

Step 1. Installing the TestDisk software device.

Step one is to put in TestDisk. To achieve this on Debian/Ubuntu distributions, replace the package deal lists and set up TestDisk.

Installing the TestDisk software device.

Images from: https://www.linuxtechi.com/how-to-recover-deleted-files-in-linux/

If you're running CentOS 8, RHEL 8, Rocky Linux 8, or AlmaLinux 8, you'll need to first deploy the EPEL repository.

Deploy the EPEL repository

Next, update the gadget and deploy the check disk as follows.

Install testdisk RHEL Distributions

TestDisk can be verified as set up by checking the version of TestDisk using the command "TestDisk --version" in the terminal.

Check Test Disk Version

We've successfully set up TestDisk 7.1, allowing us to simulate the recovery of deleted files from a pressure drive. This step enables us to test the functionality of the software and understand how it can potentially recover lost data. By doing so, we can better grasp the process involved in retrieving deleted files from a pressure drive.

Step 2. Recover deleted documents using TestDisk.

To recover deleted files from a USB drive, you can try using data recovery software such as Recuva or Disk Drill. These programs can scan the drive for deleted files and recover them, even if they're not in the Recycle Bin. You can also try using a USB drive recovery tool specifically designed for this purpose, such as EaseUS Data Recovery Wizard.

If you've accidentally deleted some files from your pen drive or USB drive, you can try recovering them. To do this, follow the steps mentioned earlier, which involve stopping using the drive, checking for any system restore points, and using a data recovery software. This should help you recover the deleted files.

in your terminal, run the subsequent command to launch TestDisk

$ testdisk

Being a command-TestDisk provides a list of options, with the maximum logical chance highlighted by default. To proceed, press input on the "Create" choice.

Verify TestDisk Version

This screen displays the installed volumes, but to view all disks and partitions, you need to have sudo permissions.

View All Disks

To use the "Sudo" command, press the forward arrow key to select it and press the input key.

To avoid the hassle, you can genuinely run the testdisk utility as a sudo user from the terminal.

TestDisk Utility

Now, the setup partitions can be displayed. Choose the force of your selected setup, which in this case is the detachable USB power. Press the "continue" button using the arrow forward key.

Select Disk Partition

TestDisk robotically detects the partition desk kind. For non-partitioned disks, together with USB drives, a non-partitioned media kind may be detected, so press enter.

The removable force's partition table can be indexed, with the lowest option being "Undelete".

Undelete Disk Utility

TestDisk scans your device for undeleted documents and highlights them in purple.

Force Undelete Files

To recover the files, select them first. Scroll down and delete the entire colon (:) from every choice. You may find that every record is highlighted in green.

Force Recover Files

Press "SHIFT + C" to copy files, then choose a location, select a directory, and press input.

Select Directory Recovery

The modification dates of the target listing can be displayed, and you can select any choice and press input again.

TestDisk will notify you that the files have been successfully copied.

To confirm that the files were copied, check the vacation spot listing to ensure the documents are present.

The recovered documents are saved with root permissions and ownership, which can be changed using the chown command.

To exit TestDisk and return to your bash shell, press "q" repeatedly until you are prompted to return to the shell.

How to Recover Linux Partition in Windows

Qiling data recovery software supports recovering lost, deleted and formatted data from ext2, ext3 Linux partitions.

Conclusion

Recovering deleted files in Linux is a crucial task that can be life-saving at times. Fortunately, using Qiling and the Command prompt, you can easily recover your data in a quick and efficient manner. This software allows you to recover files much faster than other methods, making it a great option for those in need of a speedy solution.

Related Articles


Is this information helpful?     

What can we do to improve this information? (Optional)
Refresh Please enter the verification code!