In Linux, we will encounter accidentally delete files, then we can use Extundelete to recover these deleted files.
In this experiment, I'll enable rh6-2 and use Xshell to connect remotely.
First step: Add a hard drive
How to add a hard drive I've talked about it before.
Reboot after adding hard drive (init 6)
Next, partition the hard drive:
To format:
Mount:
Step two: Create a yum repository
To mount the optical drive:
Switch to the ETC directory:
Delete and then re-build a directory and edit it with the VI editor:
Enter A to enter:
Note: The path in BASEURL=FILE:///MNT is the path that is mounted, file://is the fixed format,/mnt mount Path, this experiment is mounted to the MNT directory.
Then enter the Yum list to see if the Yum repository can be used:
Step three: Mount the shared folder
I put the package in the Lamp folder under the C drive.
Then click "Add" and the following screen will appear:
Right is the permission setting, select Read, and then select Share:
Unblock guest and set local policy permissions (user rights Assignment and security options) I've written about it in previous experiments, and it's not clear that I can look through my previous blogs.
Next scan the shared file:
Create an empty folder and mount it:
Fourth Step: Install
Extract:
First switch to the/lamp directory and see if there are any compressed packages to unzip:
Unzip (unzip to/OPT):
To switch to/OPT, the installation package is already available:
Install the Environment pack:
Once you have installed the dependent packages, reinstall the E2fsprogs-devel package once again:
Installing GCC gcc-c++:
Switch to the installation package and configure the configuration file:
The configuration file is converted to binary:
Installation:
Fifth step: Recover deleted files
To add a folder under the/ABC directory:
Simulated accidental deletion of files:
To unpack a device:
Note: The unpacking device is not in the current directory
Recover files:
Switch to the following directory and find the file that was accidentally deleted:
To recover, you can copy directly:
Restore deleted files with Extundelete in Linux