yum install gcc gcc++ yum install gcc gcc-c++ gcc-g77yum install e2fsprogs e2fsprogs-libs e2fsprogs-devel [root@dg extundelete-0.2.4]# ./configure Configuring extundelete 0.2.4 Writing generated files to disktar xjf extundelete-0.2.4.tar.bz2 cd extundelete-0.2.4 ./configure make && make install[root@dg extundelete-0.2.4]# make make -s all-recursive Making all in src extundelete.cc:571: 警告:未使用的参数‘flags’ [root@dg extundelete-0.2.4]# make install Making install in src /usr/bin/install -c extundelete "/usr/local/bin"
---查看帮助 root@dg extundelete-0.2.4]# make install Making install in src /usr/bin/install -c extundelete "/usr/local/bin" [root@dg extundelete-0.2.4]# extundelete --help Usage: extundelete [options] [--] device-file Options: --version, -[vV] Print version and exit successfully. --help, Print this help and exit successfully. --superblock Print contents of superblock in addition to the rest. If no action is specified then this option is implied. --journal Show content of journal. --after dtime Only process entries deleted on or after "dtime". --before dtime Only process entries deleted before "dtime". Actions: --inode ino Show info on inode "ino". --block blk Show info on block "blk". --restore-inode ino[,ino,...] Restore the file(s) with known inode number "ino". The restored files are created in ./RECOVERED_FILES with their inode number as extension (ie, file.12345). --restore-file "path" Will restore file "path". "path" is relative to root of the partition and does not start with a "/" The restored file is created in the current directory as "RECOVERED_FILES/path". --restore-files "path" Will restore files which are listed in the file "path". Each filename should be in the same format as an option to --restore-file, and there should be one per line. --restore-directory "path" Will restore directory "path". "path" is relative to the root directory of the file system. The restored directory is created in the output directory as "path". --restore-all Attempts to restore everything. -j journal Reads an external journal from the named file. -b blocknumber Uses the backup superblock at blocknumber when opening the file system. -B blocksize Uses blocksize as the block size when opening the file system. The number should be the number of bytes. --log 0 Make the program silent. --log filename Logs all messages to filename. --log D1=0,D2=filename Custom control of log messages with comma-separated Examples below: list of options. Dn must be one of info, warn, or --log info,error error. Omission of the "=name" results in messages --log warn=0 with the specified level to be logged to the console. --log error=filename If the parameter is "=0", logging for the specified level will be turned off. If the parameter is "=filename", messages with that level will be written to filename. -o directory Save the recovered files to the named directory. The restored files are created in a directory named "RECOVERED_FILES/" by default.中参数(options)有: --version, -[vV],显示软件版本号。 --help,显示软件帮助信息。 --superblock,显示超级块信息。 --journal,显示日志信息。 --after dtime,时间参数,表示在某段时间之后被删的文件或目录。 --before dtime,时间参数,表示在某段时间之前被删的文件或目录。动作(action)有: --inode ino,显示节点“ino”的信息。 --block blk,显示数据块“blk”的信息。 --restore-inode ino[,ino,...],恢复命令参数,表示恢复节点“ino”的文件,恢复的文件会自动放在当前目录下的RESTORED_FILES文件夹中,使用节点编号作为扩展名。 --restore-file "path",恢复命令参数,表示将恢复指定路径的文件,并把恢复的文件放在当前目录下的RECOVERED_FILES目录中。 --restore-files "path",恢复命令参数,表示将恢复在路径中已列出的所有文件。 --restore-all,恢复命令参数,表示将尝试恢复所有目录和文件。 -j journal,表示从已经命名的文件中读取扩展日志。 -b blocknumber,表示使用之前备份的超级块来打开文件系统,一般用于查看现有超级块是不是当前所要的文件。 -B blocksize,表示使用数据块大小来打开文件系统,一般用于查看已经知道大小的文件。 1>fuser -k /dev/part && umount /dev/被删除数据的盘 --杀掉访问磁盘的进程,umount 被删除数据的盘 2>extundelete --inode 2 /dev/被删除数据的盘 3>extundelete --restore-inode 13 /dev/被删除数据的盘 4>恢复到 RECOVERD_FILES/