LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 6481|回复: 9

如何恢复已删除文件?

[复制链接]
发表于 2004-10-13 09:51:30 | 显示全部楼层 |阅读模式
在文本界面误删除了文件,请问怎样才能恢复呢?(图形界面尚有回收站,文本界面,删除的文件,有临时存放文件夹吗?)请赐教.
发表于 2004-10-13 11:54:45 | 显示全部楼层
debugfs 只用于ext3试试吧.
 楼主| 发表于 2004-10-13 17:03:16 | 显示全部楼层
能说详细点吗?
发表于 2004-10-13 22:11:50 | 显示全部楼层
应该是不行的吧。
 楼主| 发表于 2004-10-14 11:52:57 | 显示全部楼层

请指点,谢谢

在文本界面误删除了文件,请问怎样才能恢复呢?
发表于 2004-10-14 14:05:50 | 显示全部楼层
恢复不了的
发表于 2004-10-14 15:30:53 | 显示全部楼层
# debugfs
debugfs 1.32 (09-Nov-2002)
debugfs:  help
Available debugfs requests:

show_debugfs_params, params
                         Show debugfs parameters
open_filesys, open       Open a filesystem
close_filesys, close     Close the filesystem
feature, features        Set/print superblock features
dirty_filesys, dirty     Mark the filesystem as dirty
init_filesys             Initalize a filesystem (DESTROYS DATA)
show_super_stats, stats  Show superblock statistics
ncheck                   Do inode->name translation
icheck                   Do block->inode translation
change_root_directory, chroot
                         Change root directory
change_working_directory, cd
                         Change working directory
list_directory, ls       List directory
show_inode_info, stat    Show inode information
link, ln                 Create directory link
unlink                   Delete a directory link
mkdir                    Create a directory
rmdir                    Remove a directory
rm                       Remove a file (unlink and kill_file, if appropriate)
kill_file                Deallocate an inode and its blocks
clri                     Clear an inode's contents
freei                    Clear an inode's in-use flag
seti                     Set an inode's in-use flag
testi                    Test an inode's in-use flag
freeb                    Clear a block's in-use flag
setb                     Set a block's in-use flag
testb                    Test a block's in-use flag
modify_inode, mi         Modify an inode by structure
find_free_block, ffb     Find free block(s)
find_free_inode, ffi     Find free inode(s)
print_working_directory, pwd
                         Print current working directory
expand_dir, expand       Expand directory
mknod                    Create a special file
list_deleted_inodes, lsdel
                         List deleted inodes
undelete, undel          Undelete file
write                    Copy a file from your native filesystem
dump_inode, dump         Dump an inode out to a file
cat                      Dump an inode out to stdout
lcd                      Change the current directory on your native filesystem
rdump                    Recursively dump a directory to the native filesystem
set_super_value, ssv     Set superblock value
logdump                  Dump the contents of the journal
htree_dump, htree        Dump a hash-indexed directory
dx_hash, hash            Calculate the directory hash of a filename
dirsearch                Search a directory for a particular filename
bmap                     Calculate the logical->physical block mapping for an in
ode
help                     Display info on command or topic.
list_requests, lr, ?     List available commands.
quit, q                  Leave the subsystem.


先把文件系统UMOUNT
用open打开文件系统
open_filesys, open       Open a filesystem
用lsdel命令可以看到已删除的文件,只有INODE号没有文件名。
list_deleted_inodes, lsdel       List deleted inodes
用undel可以恢复文件
undelete, undel          Undelete file
 楼主| 发表于 2004-10-14 16:03:51 | 显示全部楼层
tks
发表于 2004-10-15 12:56:16 | 显示全部楼层
照着RPYWT说的做了,但没有实现
前面几步都没有问题,但最后lsdel的时候
却没有列出任何被删除的文件,怎么回事呢??
发表于 2005-6-24 11:09:07 | 显示全部楼层
Post by cmoaciopm
照着RPYWT说的做了,但没有实现
前面几步都没有问题,但最后lsdel的时候
却没有列出任何被删除的文件,怎么回事呢??

man debugfs
   ext2 filesystem debugger
    是适用于 ext2 的
   而且 我认为删除因该把i-node删掉才可以,我尝试的是删除一个文件,照着步骤做的 没成功.
    我想可不可以 将ext3 转到ext2下 再恢复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表