---
title: "恢复误删除文件"
author: "apchy"
date: "2011-05-20T17:14:52Z"
tags: []
categories: ["操作系统"]
slug: "untitled"
draft: false
lastmod: "2011-05-20T17:14:52Z"
id: 1051928
url: "https://apchy.iteye.com/blog/1051928"
---

文件格式ext3，网上google了ext3grep这个工具，说要下umount 分区，但是我的系统只有一个根分区/，没办法，后找到extundelete，好像使用比较简单，网址：http://extundelete.sourceforge.net/
，安装步骤tar -xjf extundelete-0.2.0.tar.bz2

cd extundelete-0.2.0

./configure

make

举例：
恢复/dev/sda1里一个被误删除的文件 


extundelete /dev/sda1 --restore-file /data/mine/tomcat

 

恢复/dev/sda1里一个被误删除的文件夹

extundelete /dev/sda1 --restore-directory /data/mine