时间:2023-03-16来源:东坡网作者:qipeng
Linux系统操作中,有时会不小心删除重要文件,而能够恢复删除文件的软件有很多,ext3grep就是其中的一种,ext3grep在使用中需要用到不少命令,下面小编就给大家介绍下Linux使用ext3grep的方法。
步骤:
目前的最新版本是:ext3grep-0.10.2.tar.gz
我系统的环境是:虚拟机
[root@localhost bin]# uname -a
Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:54 EDT 2009 i686 i686 i386 GNU/Linux
[root@localhost bin]# cat /etc/issue
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
安装很简单
tar zxvf ext3grep-0.10.2.tar.gz
cd ext3grep-0.10.2
。/configure --prefix=/usr/local/ext3grep
make
make install
顺利安装完成。
然后进入么安装目录看一下,只有一个bin
[root@localhost ext3grep]# pwd
/usr/local/ext3grep
[root@localhost ext3grep]# ls
bin
进到bin里面看一下
[root@localhost ext3grep]# cd bin
[root@localhost bin]# ls
ext3grep
我们可以看一下帮助,下面是部分
[root@localhost bin]# 。/ext3grep -h
Running ext3grep version 0.10.2
。/ext3grep: invalid option -- h
No action specified; implying --superblock.
Usage: 。/ext3grep [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.
--print Print content of block or inode, if any.
--ls Print directories with only one line per entry.
This option is often needed to turn on filtering.
--accept filen Accept ‘filen’ as a legal filename. Can be used multi-
ple times. If you change any --accept you must remove
BOTH stage* files!
--accept-all Simply accept everything as filename.
--journal Show content of journal.
--show-path-inodes Show the inode of each directory component in paths.
Filters:
--group grp Only process group ‘grp’。
--directory Only process directory inodes.
--after dtime Only entries deleted on or after ‘dtime’。
--before dtime Only entries deleted before ‘dtime’。
--deleted Only show/process deleted entries.
--allocated Only show/process allocated inodes/blocks.
--unallocated Only show/process unallocated inodes/blocks.
--reallocated Do not suppress entries with reallocated inodes.
Inodes are considered ‘reallocated’ if the entry
is deleted but the inode is allocated, but also when
the file type in the dir entry and the inode are
different.
--zeroed-inodes Do not suppress entries with zeroed inodes. Linked
entries are always shown, regardless of this option.
--depth depth Process directories recursively up till a depth
of ‘depth’。
Actions:
--inode-to-block ino Print the block that contains inode ‘ino’。
--inode ino Show info on inode ‘ino’。
If --ls is used and the inode is a directory, then
the filters apply to the entries of the directory.
If you do not use --ls then --print is implied.
--block blk Show info on block ‘blk’。
If --ls is used and the block is the first block
of a directory, then the filters apply to entries
of the directory.
If you do not use --ls then --print is implied.
--histogram=[atime|ctime|mtime|dtime|group]
Generate a histogram based on the given specs.
Using atime, ctime or mtime will change the
meaning of --after and --before to those times.
--journal-block jblk Show info on journal block ‘jblk’。
--journal-transaction seq
Show info on transaction with sequence number ‘seq’。
--dump-names Write the path of files to stdout.
This implies --ls but suppresses it‘s output.
--search-start str Find blocks that start with the fixed string ’str‘。
--search str Find blocks that contain the fixed string ’str‘。
--search-inode blk Find inodes that refer to block ’blk‘。
--search-zeroed-inodes Return allocated inode table entries that are zeroed.
--inode-dirblock-table dir
Print a table for directory path ’dir‘ of directory
block numbers found and the inodes used for each file.
2023-03-16
Linux下的crontab定时执行任务命令详解2023-03-16
Linux关机命令大全:Linux各关机命令之间的区别和用法2023-03-16
linux常用命令有哪些?Linux常用操作命令大全Ubuntu 是一个启动速度超快、界面友好、安全性好的开源操作系统,它由全球顶尖开源软件专家开发,适用于桌面电脑、笔记本电脑等,并且它可以永久免费使用。很多朋友都不知道要怎么安装Ubuntu系统,那Ubuntu系统要怎么安装?...
2023-03-16
Linux系统下Nginx 日志可以查看系统运行记录和出错说明,对Nginx 日志的分析可以了解系统运行的状态。那么Linux系统Nginx日志怎么分析呢?...
2023-03-16