UNIX下的“lost+found”文件夹是干什么用的

来源:互联网 发布:淘宝店铺运营教程 编辑:程序博客网 时间:2024/03/28 22:27

http://www.itpub.net/thread-1067024-1-1.html

Orphaned files and directories (allocated but not referenced) are placed
in lost+found during "fsck" operations. Files are named by the inode
reference "as found" by fsck. Files present in this directory are
inconsistent or badly injured.


是用来存放fsck过程中部分修复的文件的。一般情况下里面是没有内容的。

 

The lost+found Directory
When files are recovered after any sort of problem or failure,they are placed in the lost + found directory, if the kernel cannot ascertain the proper location in the system

/lost found:
一般重启或关闭system,可下sync;sync.避免有些message会留在硬盘之cache上,此时dirty bit为1,当再开机时,system会去检查每一个dirtybit是否为0,假如为1则会执行fsck。作fsck时,常会问要否删除dirtybit,如选yes时,会把inode集中放在lost found®用file 指令去查寻,不重要再行删除即可(inode number)。简单言之,本目录乃记录硬盘上的partition于资料流失时作fsck寻找回来的遗失文件片段。

 

fsck时候一些恢复的文件或者链接要放在这里。

另外删除这个文件夹,一定要使用 mklost+found建立,而不是简单的mkdir  lost+found。
因为它先要保留一定的槽位来放文件的目录。

 

 

和Windows fat16/32文件系统 scandisk后的FOUND001目录一样的作用,文件系统结构修复后的孤立文件

原创粉丝点击