testdisk 恢复文件
Ever stuck in a situation where you accidentally deleted a file? In this tutorial, we’ll go over how to install TestDisk in Linux and recover deleted files.
是否曾经遇到过意外删除文件的情况? 在本教程中,我们将介绍如何在Linux中安装TestDisk以及恢复已删除的文件。
In this tutorial, I’ll be using an Ubuntu server to work with, but even if you are on any other distribution, you can follow the same steps. The only thing that will be different is the package manager used for installation.
在本教程中,我将使用Ubuntu服务器进行工作,但是即使您使用任何其他发行版,也可以按照相同的步骤进行操作。 唯一不同的是用于安装的程序包管理器。
在Linux上安装TestDisk (Install TestDisk on Linux )
The testdisk package is available on all the major Linux distributions and can be easily downloaded with the use of the default package manager. Here, I’ve listed down the distro-specific commands to install testdisk on Linux.
testdisk软件包在所有主要的Linux发行版中都可用,并且可以使用默认的软件包管理器轻松下载。 在这里,我列出了在Linux上安装testdisk的特定于发行版的命令。
Install TestDisk on Ubuntu/Debian
在Ubuntu / Debian上安装TestDisk
sudo apt update
sudo apt -y install testdisk
We’re using the apt package manager instead of the apt-get since that’s the new package manager for Ubuntu/Debian.
我们使用apt软件包管理器而不是apt-get,因为这是Ubuntu / Debian的新软件包管理器。
Install TestDisk on Red Hat and CentOS 7
在Red Hat和CentOS 7上安装TestDisk
yum install epel-release
yum update
yum install testdisk
Install TestDisk on Red Hat and CentOS 8
在Red Hat和CentOS 8上安装TestDisk
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
yum update
yum install testdisk
You need to also enable/