Everybody has accidentally deleted some files while working once or twice in their life. That is why it is important to know the proper tools and procedures to recover files.
TestDisk is a command-line data recovery tool, its functionality extends to the recovery of deleted/corrupt files, partitions, and filesystems. It also supports boot sector recovery with the help of data backup. Despite its vast functionalities, this tool is easy to use.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related files restoration queries on any Linux System.
In this context, we shall look into TestDisk and how to use it to recover a deleted file in a Linux system.
Linux usually has two options for removing any file. One is the "move to trash" option while the other is "delete". If you have removed the file by placing them in the trash, you can simply recover them from the trash. But if you have used the "delete" option to remove the file, the recovery process becomes complicated. So it is recommended practice to use the "move to trash" option while removing any file.
To install the TestDisk through its apt package, run the following command in the terminal:
$ sudo apt install testdisk
Now, type TestDisk in Terminal to open the tool and authenticate by providing a password when prompted.
Note: The c and C in the above two steps are case-sensitive.
This article covers how to recover the file in a few minutes using TestDisk on Linux systems. Deleting files is unavoidable as everyone likes to work in a decluttered and organized system. Whenever we delete something from our system, it does not actually get deleted, till that space gets overwritten by something else in the disk.
What TestDisk tool can do on your Linux System: