FAT 文件系统中奇怪的目录项
所以我试图弄清楚 FAT FS 是如何工作的,但对根目录表感到困惑。我在分区中有两个文件: test.txt 和 innit.eh ,结果如下表:
>以 0xE5 开头的条目被删除,因此我假设这些条目是由于重命名而创建的。实际文件的条目如下所示:
TEST TXT *snip*
INNIT EH *snip*
我不明白的是这些条目
At.e.s.t......t.x.t
Ai.n.n.i.t.....e.h.
来自何处以及它们的用途。它们不以 0xE5 开头,因此应被视为现有文件。
顺便说一句,我使用 Debian Linux 创建文件系统和文件,但我注意到 FS 和在 Windows 上创建的文件也有类似的行为。
So I'm trying to figure out how the FAT FS works and got confused by the root directory table. I have two files in the partition: test.txt and innit.eh which results in the following table:
The entries starting with 0xE5 are deleted, so I assume these were created due to renaming. The entries for the actual files look like this:
TEST TXT *snip*
INNIT EH *snip*
What I don't understand is where the entries like
At.e.s.t......t.x.t
Ai.n.n.i.t.....e.h.
are coming from and what are they for. They do not start with 0xE5, so should be treated as existing files.
By the way, I'm using Debian Linux to create filesystems and files, but I noticed similar behaviour on FS and files created on Windows.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
名称的 ASCII 部分(字母彼此靠近)是传统的 8.3 DOS 短名称。你看它只使用大写字母。在 DOS 中,只有这些。
较长的部分(中间有 0x00)是长名称(在 Windows 中显示),它是 Unicode,每个字符使用 16 位。
The ASCII parts of the name (where the letters were close to each other) is the legacy 8.3 DOS shortname. You see it only uses capital letters. In DOS, only these would be there.
The longer parts (with 0x00 in between) is the long name (shown in Windows) which is Unicode, and uses 16bits per character.
中间的字节都是
0x00
,给人一种强烈的感觉,它们存储在UTF-16 而不是 UTF-8。也许它们的扩展名类似于其他长文件名的 VFAT 扩展名?The intervening bytes are all
0x00
, which gives a strong feeling that they are stored in UTF-16 instead of UTF-8. Perhaps they are there as an extension similar to the other VFAT extensions for long filenames?