ext3grep practice record

mkdir /disk /mydata
cd /mydata
if=/dev/zero of=/mydata/disk1 count=102400
mkfs.ext3 /mydata/disk1
mount -o loop /mydata/disk1 /disk
cd /disk/
cp /boot/initrd-2.6.31.5-0.1-desktop /disk/
cp /etc/profile /disk/
echo peterguo > ext3grep.txt
ls
md5sum ext3grep.txt profile initrd-2.6.31.5-0.1-desktop
rm -rf /disk/*
cd /
l /disk/

cd /opt/
umount /disk
ext3grep /mydata/disk1 --ls --inode 2
ext3grep /mydata/disk1 --dump-names
ext3grep /mydata/disk1 --restore-file ext3grep.txt
l RESTORED_FILES/
cat RESTORED_FILES/ext3grep.txt

你可能感兴趣的:(ext3grep practice record)