Home  >  Article  >  Operation and Maintenance  >  How to recover deleted files in linux

How to recover deleted files in linux

coldplay.xixi
coldplay.xixiOriginal
2020-08-31 15:16:0820453browse

Linux method of recovering deleted files: first jump to the path of the deleted file; then use the system's own restore tool debugfs to repair it, and run relevant instructions to find the deleted files; then execute the command to get the information; Finally return to the path.

How to recover deleted files in linux

Linux method to recover deleted files:

1. Run the command box under Linux and jump to the Delete the file path.

2. Check the partition location of the path through df <path></path>3. Then use the system's own restore tool debugfs to repair it, and run the following Command (open is followed by yours, ls -d is followed by your path name)

How to recover deleted files in linux4. You can find the deleted file

5. Then use the execution

logdump –i

to get the following information. Be sure to remember the block and offset information, and then quit to exit debugfs

How to recover deleted files in linux6. Then execute the following

dd if=/dev/vda1 of=/mnt/Summer_Test/China.png bs=1152 count=1 skip=6291611

command, where bs is the value of block, skip is the value of offset 7. Then return to the path and you will find that China.png has been restored!

Related learning recommendations:
linux video tutorial

The above is the detailed content of How to recover deleted files in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn