简体   繁体   中英

How to find disk block that contains a file in FAT

I am wondering how you can find a file in a FAT file system.

While in Linux there is a root block that tells me where the root is and I can just iterate through directory i-nodes and their blockpointers to find other other inodes from directory entries, there is no such thing in a FAT table. More than that, the idea of having iterating throughout all a linked list, I find it very confusing.

Can someone explain how we can find the disk blocks that contain the file in FAT?

It depends which FAT Version are you dealing with. Eg it's different of the numbers of clusters. But in general you can find everything important in FAT Specification . The chapter FAT Initialisatzion explain how to calculate the location of FAT. Another example you find here in OS DEV

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM