Copyright (C) Cd Chen - http://www.cdchen.idv.tw/淺談檔案系統陳永昇 (Cd Chen)http://www.cdchen.idv.tw/本⽂文件⾮非公開授權,⾮非經同意,禁⽌止轉載Version...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/2
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/磁碟設備檔案系統使⽤用者空間磁區、磁柱、磁軌inode、block檔案、⺫⽬目錄、...2
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/檔案系統 inode、block2
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/檔案系統 inode、block2
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode檔案系統 inode、block2
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode檔案系統 inode、block2
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...檔案系統 inode、block2
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...3
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/I would liketo the themebut the fontis not...file1blockinode... 211 212 2...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/I would liketo the themebut the fontis not...file1blockinode... 211 212 2...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/I would liketo the themebut the fontis not...file1blockinode... 211 212 2...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...4
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$5
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ ls dir/5
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ ls dir/S5
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$6
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ ls -l dir/fil...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ ls -l dir/fil...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$7
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ cat dir/file17
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ cat dir/file1S7
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/File Operations8
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/建⽴立與複製檔案1. 檢查是否有可⽤用的 inode 與⾜足夠的 block2. 將資料寫⼊入 block3. 產⽣生 Metadata4. 將 ...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/搬移檔案‣ 不同檔案系統1. 先複製檔案2. 刪除原始檔案‣ 相同檔案系統1. 在⺫⽬目的⺫⽬目錄的 inode Table 新增紀錄2. 移除原...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/更改檔案名稱1. 找出儲存檔案的⺫⽬目錄之內容2. 變更 inode Table 的名稱3. 變更⺫⽬目錄的 ctime11
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/刪除檔案1. 遞減 Link Count‣ 遞減後為 0 時:‣ 將 block 與 inode 放⼊入可⽤用清單中2. 移除⺫⽬目錄 inode...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/Link Files13
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/[student@linux ~]$ ls -il dir/102 -rw-rw-r-- 2 student student 128 04/01 ...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$15
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ cat dir/hard15
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ cat dir/hardS15
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$16
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ cat dir/soft16
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ cat dir/softS16
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 ...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 ...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 ...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 ...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 ...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 ...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 ...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 ...
Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 ...
Upcoming SlideShare
Loading in …5
×

Inode block

959 views

Published on

這是我上課用來解釋 inode / block 觀念的投影片,與大家分享,敬請指教,謝謝!!

Published in: Education
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
959
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
24
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Inode block

  1. 1. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/淺談檔案系統陳永昇 (Cd Chen)http://www.cdchen.idv.tw/本⽂文件⾮非公開授權,⾮非經同意,禁⽌止轉載Version: 20080420-RHEL5.11
  2. 2. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/2
  3. 3. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/磁碟設備檔案系統使⽤用者空間磁區、磁柱、磁軌inode、block檔案、⺫⽬目錄、...2
  4. 4. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/檔案系統 inode、block2
  5. 5. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/檔案系統 inode、block2
  6. 6. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode檔案系統 inode、block2
  7. 7. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode檔案系統 inode、block2
  8. 8. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...檔案系統 inode、block2
  9. 9. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...3
  10. 10. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/I would liketo the themebut the fontis not...file1blockinode... 211 212 213 214103102101...3
  11. 11. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/I would liketo the themebut the fontis not...file1blockinode... 211 212 213 214103102101... 212 213I wouldlike tothe themebut thefont isnot...Content3
  12. 12. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/I would liketo the themebut the fontis not...file1blockinode... 211 212 213 214103102101...Type RegularMode rw-rw-r--Link Count 1User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 213102 212 213I wouldlike tothe themebut thefont isnot...ContentMetadata3
  13. 13. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...4
  14. 14. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211ContentMetadataName inode. 101.. 1045file1 102file14
  15. 15. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$5
  16. 16. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ ls dir/5
  17. 17. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ ls dir/S5
  18. 18. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101[student@linux ~]$ ls dir/S5
  19. 19. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101[student@linux ~]$ ls dir/211S5
  20. 20. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102[student@linux ~]$ ls dir/211S5
  21. 21. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102[student@linux ~]$ ls dir/211file1S5
  22. 22. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102[student@linux ~]$ ls dir/211file1file1[student@linux ~]$S5
  23. 23. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$6
  24. 24. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ ls -l dir/file16
  25. 25. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ ls -l dir/file1S6
  26. 26. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101[student@linux ~]$ ls -l dir/file1S6
  27. 27. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101[student@linux ~]$ ls -l dir/file1211S6
  28. 28. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102[student@linux ~]$ ls -l dir/file1211S6
  29. 29. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102[student@linux ~]$ ls -l dir/file1211S1026
  30. 30. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102[student@linux ~]$ ls -l dir/file1211S102Type RegularMode rw-rw-r--Link Count 1User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 2131026
  31. 31. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102[student@linux ~]$ ls -l dir/file1211S102Type RegularMode rw-rw-r--Link Count 1User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 213102Regularrw-rw-r--1studentstudent1282008/04/016
  32. 32. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102[student@linux ~]$ ls -l dir/file1211-rw-rw-r-- 1 student student 128 04/01 file1[student@linux ~]$S102Type RegularMode rw-rw-r--Link Count 1User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 213102Regularrw-rw-r--1studentstudent1282008/04/016
  33. 33. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$7
  34. 34. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ cat dir/file17
  35. 35. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ cat dir/file1S7
  36. 36. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101[student@linux ~]$ cat dir/file1S7
  37. 37. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101[student@linux ~]$ cat dir/file1211S7
  38. 38. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102[student@linux ~]$ cat dir/file1211S7
  39. 39. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102[student@linux ~]$ cat dir/file1211S1027
  40. 40. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102[student@linux ~]$ cat dir/file1211S102Type RegularMode rw-rw-r--Link Count 1User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 2131027
  41. 41. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102[student@linux ~]$ cat dir/file1211S102Type RegularMode rw-rw-r--Link Count 1User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 2131022127
  42. 42. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102[student@linux ~]$ cat dir/file1211S102Type RegularMode rw-rw-r--Link Count 1User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 213102212212 213I wouldlike tothe themebut thefont isnot...7
  43. 43. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102[student@linux ~]$ cat dir/file1211S102Type RegularMode rw-rw-r--Link Count 1User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 213102212212 213I wouldlike tothe themebut thefont isnot...7
  44. 44. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102[student@linux ~]$ cat dir/file1211I would like to the theme but the font is not..[student@linux ~]$S102Type RegularMode rw-rw-r--Link Count 1User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 213102212212 213I wouldlike tothe themebut thefont isnot...7
  45. 45. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/File Operations8
  46. 46. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/建⽴立與複製檔案1. 檢查是否有可⽤用的 inode 與⾜足夠的 block2. 將資料寫⼊入 block3. 產⽣生 Metadata4. 將 Metadata 存⼊入 inode‣ 設定 ctime、mtime、atime9
  47. 47. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/搬移檔案‣ 不同檔案系統1. 先複製檔案2. 刪除原始檔案‣ 相同檔案系統1. 在⺫⽬目的⺫⽬目錄的 inode Table 新增紀錄2. 移除原始⺫⽬目錄 inode Table 相關紀錄3. 修改⺫⽬目的與原始⺫⽬目錄的 ctime10
  48. 48. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/更改檔案名稱1. 找出儲存檔案的⺫⽬目錄之內容2. 變更 inode Table 的名稱3. 變更⺫⽬目錄的 ctime11
  49. 49. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/刪除檔案1. 遞減 Link Count‣ 遞減後為 0 時:‣ 將 block 與 inode 放⼊入可⽤用清單中2. 移除⺫⽬目錄 inode Table 的紀錄3. 更新⺫⽬目錄的 ctime12
  50. 50. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/Link Files13
  51. 51. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/[student@linux ~]$ ls -il dir/102 -rw-rw-r-- 2 student student 128 04/01 file1102 -rw-rw-r-- 2 student student 128 04/01 hard103 lrwxrwxrwx 1 student student 5 04/01 soft[student@linux ~]$Hard Link Soft Link原理 共⽤用 inode,遞增 Link Count 儲存原始檔案的路徑名稱Metadata 與原始檔案相同•Type: l (Link)•Perm: 777•Link Count: 獨⽴立•Ownership: 建⽴立者•Size: 原始檔案的路徑名稱⻑⾧長度•Timestamp:獨⽴立刪除原始檔 可⽤用 失效建⽴立同名原始檔 不同 相同限制•原始檔案不能為⺫⽬目錄•必須與原始檔在相同檔案系統無14
  52. 52. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$15
  53. 53. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ cat dir/hard15
  54. 54. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ cat dir/hardS15
  55. 55. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101[student@linux ~]$ cat dir/hardS15
  56. 56. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101[student@linux ~]$ cat dir/hard211S15
  57. 57. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102hard 102[student@linux ~]$ cat dir/hard211S15
  58. 58. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102hard 102[student@linux ~]$ cat dir/hard211S10215
  59. 59. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102hard 102[student@linux ~]$ cat dir/hard211S102Type RegularMode rw-rw-r--Link Count 2User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 21310215
  60. 60. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102hard 102[student@linux ~]$ cat dir/hard211S102Type RegularMode rw-rw-r--Link Count 2User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 21310221215
  61. 61. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102hard 102[student@linux ~]$ cat dir/hard211S102Type RegularMode rw-rw-r--Link Count 2User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 213102212212 213I wouldlike tothe themebut thefont isnot...15
  62. 62. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102hard 102[student@linux ~]$ cat dir/hard211S102Type RegularMode rw-rw-r--Link Count 2User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 213102212212 213I wouldlike tothe themebut thefont isnot...15
  63. 63. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102hard 102[student@linux ~]$ cat dir/hard211I would like to the theme but the font is not..[student@linux ~]$S102Type RegularMode rw-rw-r--Link Count 2User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 213102212212 213I wouldlike tothe themebut thefont isnot...15
  64. 64. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$16
  65. 65. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ cat dir/soft16
  66. 66. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...[student@linux ~]$ cat dir/softS16
  67. 67. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101[student@linux ~]$ cat dir/softS16
  68. 68. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101[student@linux ~]$ cat dir/soft211S16
  69. 69. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102soft 103[student@linux ~]$ cat dir/soft211S16
  70. 70. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101...Type DirectoryMode rwxrwxr-xLink Count 2User studentGroup studentSize 1024Timestamp 2008/04/01Blocks 211101 211Name inode. 101.. 1045file1 102soft 103[student@linux ~]$ cat dir/soft211S10316
  71. 71. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 102soft 103[student@linux ~]$ cat dir/soft103Type LinkMode rwxrwxrwxLink Count 1User studentGroup studentSize 5Timestamp 2008/04/01Blocks 21410316
  72. 72. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 102soft 103[student@linux ~]$ cat dir/soft103Type LinkMode rwxrwxrwxLink Count 1User studentGroup studentSize 5Timestamp 2008/04/01Blocks 21421410316
  73. 73. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 102soft 103[student@linux ~]$ cat dir/soft103Type LinkMode rwxrwxrwxLink Count 1User studentGroup studentSize 5Timestamp 2008/04/01Blocks 214214103 214file116
  74. 74. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 102soft 103[student@linux ~]$ cat dir/softType LinkMode rwxrwxrwxLink Count 1User studentGroup studentSize 5Timestamp 2008/04/01Blocks 214214103 214file110216
  75. 75. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 102soft 103[student@linux ~]$ cat dir/softType RegularMode rw-rw-r--Link Count 1User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 213102Type LinkMode rwxrwxrwxLink Count 1User studentGroup studentSize 5Timestamp 2008/04/01Blocks 214214103 214file110216
  76. 76. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 102soft 103[student@linux ~]$ cat dir/softType RegularMode rw-rw-r--Link Count 1User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 213102212Type LinkMode rwxrwxrwxLink Count 1User studentGroup studentSize 5Timestamp 2008/04/01Blocks 214214103 214file110216
  77. 77. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 102soft 103[student@linux ~]$ cat dir/softType RegularMode rw-rw-r--Link Count 1User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 213102212212 213I wouldlike tothe themebut thefont isnot...Type LinkMode rwxrwxrwxLink Count 1User studentGroup studentSize 5Timestamp 2008/04/01Blocks 214214103 214file110216
  78. 78. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 102soft 103[student@linux ~]$ cat dir/softType RegularMode rw-rw-r--Link Count 1User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 213102212212 213I wouldlike tothe themebut thefont isnot...Type LinkMode rwxrwxrwxLink Count 1User studentGroup studentSize 5Timestamp 2008/04/01Blocks 214214103 214file110216
  79. 79. Copyright (C) Cd Chen - http://www.cdchen.idv.tw/blockinode... 211 212 213 214103102101... 211Name inode. 101.. 1045file1 102soft 103[student@linux ~]$ cat dir/softI would like to the theme but the font is not..[student@linux ~]$Type RegularMode rw-rw-r--Link Count 1User studentGroup studentSize 128Timestamp 2008/04/01Blocks 212, 213102212212 213I wouldlike tothe themebut thefont isnot...Type LinkMode rwxrwxrwxLink Count 1User studentGroup studentSize 5Timestamp 2008/04/01Blocks 214214103 214file110216

×