Chapter 14:檔案系統 === :::info 這是讀書筆記  作者:鄭鋼 出版社:佳魁資訊股份有限公司 出版日期:2017/05/31 ::: >[time=2025-08-05] --- # 檔案系統概念簡介 * EBR * Super Block * Block bitmap * inode bitmap * inode table(array):指向一個 inode 結構。 * root directory # 建立檔案系統 ## Source Code https://github.com/yifengyou/os-elephant/tree/master/code/c14/b ## Result partition format  mount  # 檔案描述符:file descriptor PCB 中新增 fd table。 # 檔案操作基礎函數及建立檔案 ## Source Code https://github.com/yifengyou/os-elephant/tree/master/code/c14/c ## Result   # 檔案的開啟和關閉 ## Source Code https://github.com/yifengyou/os-elephant/tree/master/code/c14/d ## Result  # 檔案寫入 ## Source Code https://github.com/yifengyou/os-elephant/tree/master/code/c14/e * 先計算所需的所有 blocks。 * 更新 bitmap。 * 然後再寫入硬碟。 ## Result  0x2AB(sector number) * 512(sector size) = 349696 ```shell xxd -s +349696 -l 512 sr_hd80m.img ```  # 讀取檔案 ## Source Code https://github.com/yifengyou/os-elephant/tree/master/code/c14/f ## Result  # 檔案讀寫指標定位 ## Source Code https://github.com/yifengyou/os-elephant/tree/master/code/c14/g ## Result  # 檔案刪除 ## Source Code https://github.com/yifengyou/os-elephant/tree/master/code/c14/h ## Result  # 建立目錄 ## Source Code https://github.com/yifengyou/os-elephant/tree/master/code/c14/i ## Result  # 目錄的讀取 ## Source Code https://github.com/yifengyou/os-elephant/tree/master/code/c14/k ## Result  # 刪除目錄 ## Source Code https://github.com/yifengyou/os-elephant/tree/master/code/c14/l ## Result  # 工作目錄:Current Working Directory(cwd) ## Source Code https://github.com/yifengyou/os-elephant/tree/master/code/c14/m ## Result  # 檔案屬性 ## Source Code https://github.com/yifengyou/os-elephant/tree/master/code/c14/n ## Result 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up