ClickCease Steps to Recover Lost and Deleted Data in Linux - TuxCare

Join Our Popular Newsletter

Join 4,500+ Linux & Open Source Professionals!

2x a month. No spam.

Steps to Recover Lost and Deleted Data in Linux

Obanla Opeyemi

September 2, 2022 - TuxCare expert team

Losing files can generally be a painful experience, especially when it comes to a lot of vital information and Linux users are not exempted. Often, when these files are deleted, they cannot be recovered because people do not have the technical know-how to deal with them.

It is however possible to recover files. To recover deleted or lost files, illustration is needed. For example, a file ‘linuxshelltips’ on removable media (/dev/sdb5) on our Linux system at (/media/dnyce/117137A85FFD287C) partition was deleted and needs to be restored.

It is possible to recover deleted files in Linux with TestDisk Data Recovery Tool. Not only is the tool effective in recovering lost data, it can also be used to restore corrupted file systems in a Linux environment.

TestDisk Data Recovery Tool can be installed on major Linux distributions. Once installed, it is important to switch to the root user account and start TestDisk and press [Enter] on the highlighted option that says “Create a new log file.”

Once the action has been taken, users will receive a list of all the hard disk devices present on their systems. They can then navigate to the device from which they want to recover their lost data.

The next action is to use the keyboard arrow keys and navigate to the [Proceed] menu option at the bottom of the drive list.

Although TestDisk tends to highlight the most practical option, users are advised to select the default option for the partition table by pressing [Enter] on the keyboard, then clicking on the [Advanced] option and pressing [Enter] on the keyboard.

After that, users can navigate to the partition option, which displays the [Undelete] option at the bottom of the terminal window, and press [Enter] on their keyboard.

After the action, the deleted linuxshelltips file is restored.

Users who wish to recover more than one file are advised to use the keyboard key [a] to select/deselect them. To copy multiple selected files, it is recommended to use the keyboard key [c].

The sources for this piece include an article in Linuxshelltips.

Looking to automate vulnerability patching without kernel reboots, system downtime, or scheduled maintenance windows?

Learn About Live Patching with TuxCare

Related Articles

Cybersecurity Up in the...

On a fictional tv show that started airing last year,...

January 25, 2023

How to Apply Linux Kernel...

Linux kernel updates are a fact of life. They are...

January 23, 2023

The Ultimate Guide to Linux...

System administrators that work in enterprise environments know that patching...

January 20, 2023

Securing the Linux Kernel Hiding...

Operational Technology (OT) and Industrial Control Systems (ICS) technologies help...

November 21, 2022

Embedded Linux: A Quick Beginner’s...

What Is an Embedded System?   Before diving into embedded Linux,...

November 9, 2022

Firefox 105 Offers New Features...

Mozilla is promoting the upcoming Firefox 105 with amazing features...

September 13, 2022