Veteran Linux players, generally do not mistakenly delete files, even if the file is mistakenly deleted, often in advance to make a backup. What if a rookie like me accidentally deletes a file and doesn't have a backup? I'll tell you the acting knowledgeable.
There are many file repair tools in Linux, in our 51cto has been introduced by the master, I will not say, I will introduce my method! I'm using the Debugfs tool.
The steps are as follows:
1. Delete any file
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5A/1D/wKiom1T2tETz11GjAAHW9Omil8s018.jpg "title=" Qq20150304151928.png "alt=" Wkiom1t2tetz11gjaahw9omil8s018.jpg "/>
2. Check the disk where you deleted the files, my/dev/sda2.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5A/1D/wKiom1T2tIuhxb1dAAH6tES6sI0882.jpg "title=" Qq20150304152109.png "alt=" Wkiom1t2tiuhxb1daah6tes6si0882.jpg "/>
3. Start Debugfs (enter Debugfs at the command line) and open the partition where the deleted files are located, mine is/dev/sda2
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5A/1E/wKiom1T2tMWQufKSAAHIdvNlu_s440.jpg "title=" Qq20150304152242.png "alt=" Wkiom1t2tmwqufksaahidvnlu_s440.jpg "/>
4. Find deleted Files ls-d (<> and numbers) .<3388> that's what I'm looking for.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5A/1A/wKioL1T2tobD5QpMAAIBOiehnag557.jpg "title=" Qq20150304152310.png "alt=" Wkiol1t2tobd5qpmaaiboiehnag557.jpg "/>
5.logdump-i <3388> Query the block number, and I'll black that number.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5A/1E/wKiom1T2tj_gYM8lAAH78DgA2c4521.jpg "title=" Qq20150304152412.png "alt=" Wkiom1t2tj_gym8laah78dga2c4521.jpg "/>
6. Exit Debugfs, enter quit or Q.
7. Recover deleted files by mistake.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5A/1E/wKiom1T2ttrAf-xsAAIeyVy2xIk007.jpg "title=" Qq20150304152525.png "alt=" Wkiom1t2ttraf-xsaaieyvy2xik007.jpg "/>
8. Prove it.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5A/1E/wKiom1T2twej54V7AAIOtUCzfP0359.jpg "title=" Qq20150304152551.png "alt=" Wkiom1t2twej54v7aaiotuczfp0359.jpg "/>
I write may be some simple, if there is no understanding of the place to welcome the exchange, there is no place to welcome treatise.
This article is from the "fork-like Command" blog, so be sure to keep this source http://8656820.blog.51cto.com/8646820/1617255
Error deleted file recovery under Linux