CS360 Project Level-1 Check List PART 2 DUE and DEMO: 4-13-2023 ====================================================================== Download samples/LEVEL1/diskimage; you MUST use this diskimage !!! Sample solution: samples/LEVLE1/part1.bin (mkdir_creat_rmdir) samples/LEVEL1/part2.bin (link_unlink_symlink) ====================================================================== PART1 check list: ls_mkdir_creat_rmdir as in check1.html ============================================================ PART2 check list: link_unlink_symlink 1. startup: ------------------------------------------------------------------- dev = 3 check: superblock magic = 0xef53 OK ninodes=1024 nblocks=4096 inode_sise=256 inodes_per_block=4 ifactor=2 bmap=18 imap=19 iblk=20 mount root creating P1 as running process root shareCount=2 P1 running: command [ls|mkdir|creat|rmdir|link|unlink|symlink] : ------------------------------------------------------------------ 2. ls; mkdir dir1; creat file1; ls 10 ----------------------------------------------------------------------- i_block[0] = 276 drwxr-xr-x 2 0 0 Apr 5 14:22:28 2023 1024 . [3 2] drwxr-xr-x 2 0 0 Apr 5 14:22:28 2023 1024 .. [3 2] ****************************************************** i_block[0] = 276 drwxr-xr-x 3 0 0 Apr 5 14:22:28 2023 1024 . [3 2] drwxr-xr-x 3 0 0 Apr 5 14:22:28 2023 1024 .. [3 2] drwxr-xr-x 2 0 0 Apr 12 09:02:41 2023 1024 dir1 [3 11] -rw-r--r-- 1 0 0 Apr 12 09:02:47 2023 0 file1 [3 12] ****************************************************** 3. link dir1 newfile 10 --------------------------------------------------------------------- i_block[0] = 276 i_number rec_len name_len name 2 12 1 . 2 12 2 .. 11 12 4 dir1 found dir1 : inumber = 11 dir1 is a DIR, can't link to DIR -------------------------------------------------------------------- 4. link file1 newfile; ls 20 -------------------------------------------------------------------- i_block[0] = 276 drwxr-xr-x 3 0 0 Apr 5 14:22:28 2023 1024 . [3 2] drwxr-xr-x 3 0 0 Apr 5 14:22:28 2023 1024 .. [3 2] drwxr-xr-x 2 0 0 Apr 12 09:02:41 2023 1024 dir1 [3 11] -rw-r--r-- 2 0 0 Apr 12 09:02:47 2023 0 file1 [3 12] -rw-r--r-- 2 0 0 Apr 12 09:02:47 2023 0 newfile [3 12] ****************************************************** MUST show file1 newfile = [3 12] with links_count=2 5. link newfile another; ls 10 ---------------------------------------------------------------------- i_block[0] = 276 drwxr-xr-x 3 0 0 Apr 5 14:22:28 2023 1024 . [3 2] drwxr-xr-x 3 0 0 Apr 5 14:22:28 2023 1024 .. [3 2] drwxr-xr-x 2 0 0 Apr 12 09:02:41 2023 1024 dir1 [3 11] -rw-r--r-- 3 0 0 Apr 12 09:02:47 2023 0 file1 [3 12] -rw-r--r-- 3 0 0 Apr 12 09:02:47 2023 0 newfile [3 12] -rw-r--r-- 3 0 0 Apr 12 09:02:47 2023 0 another [3 12] ****************************************************** MUST show file1 newfile another = [3 12] with links_count=3 6. unlinlk file1; ls 20 ----------------------------------------------------------------------- i_block[0] = 276 drwxr-xr-x 3 0 0 Apr 5 14:22:28 2023 1024 . [3 2] drwxr-xr-x 3 0 0 Apr 5 14:22:28 2023 1024 .. [3 2] drwxr-xr-x 2 0 0 Apr 12 09:02:41 2023 1024 dir1 [3 11] -rw-r--r-- 2 0 0 Apr 12 09:02:47 2023 0 newfile [3 12] -rw-r--r-- 2 0 0 Apr 12 09:02:47 2023 0 another [3 12] ****************************************************** MUST show file1 removed; newfile,another=[3 12] with links_count=2 7. symlink dir1 here; ls 20 ---------------------------------------------------------------------------- i_block[0] = 276 drwxr-xr-x 3 0 0 Apr 5 14:22:28 2023 1024 . [3 2] drwxr-xr-x 3 0 0 Apr 5 14:22:28 2023 1024 .. [3 2] drwxr-xr-x 2 0 0 Apr 12 09:02:41 2023 1024 dir1 [3 11] lrw-r--r-- 1 0 0 Apr 12 09:15:34 2023 4 here -> dir1 [3 13] -rw-r--r-- 2 0 0 Apr 12 09:02:47 2023 0 newfile [3 12] -rw-r--r-- 2 0 0 Apr 12 09:02:47 2023 0 another [3 12] ****************************************************** MUST show here=[3 13], type=l,size=4; ls must show here -> dir1 8. unlink here; ls 10 ------------------------------------------------------------------------- i_block[0] = 276 drwxr-xr-x 3 0 0 Apr 5 14:22:28 2023 1024 . [3 2] drwxr-xr-x 3 0 0 Apr 5 14:22:28 2023 1024 .. [3 2] drwxr-xr-x 2 0 0 Apr 12 09:02:41 2023 1024 dir1 [3 11] -rw-r--r-- 2 0 0 Apr 12 09:02:47 2023 0 newfile [3 12] -rw-r--r-- 2 0 0 Apr 12 09:02:47 2023 0 another [3 12] ****************************************************** MUST show here is removed Total=100 ============== Linux test ============== exit from YOUR project show diskimage # show diskimage contents under Linux ========================================