{
 "建立:mkdir 與 touch#1": {
  "type": "flow",
  "reveal": [
   0,
   5,
   5
  ],
  "nodes": [
   {
    "label": "建立",
    "sub": "資料夾和檔案"
   },
   {
    "label": "複製"
   },
   {
    "label": "搬移"
   },
   {
    "label": "改名"
   },
   {
    "label": "刪除"
   }
  ],
  "layout": "snake"
 },
 "建立:mkdir 與 touch#2": {
  "type": "table",
  "head": [
   "指令",
   "作用"
  ],
  "rows": [
   [
    "mkdir",
    "make directory,建立目錄"
   ],
   [
    "mkdir -p",
    "連同缺少的上層一起建,已存在不報錯"
   ]
  ],
  "reveal": [
   1,
   2
  ],
  "widths": [
   2,
   4
  ]
 },
 "建立:mkdir 與 touch#4": {
  "type": "table",
  "head": [
   "指令",
   "結果"
  ],
  "rows": [
   [
    "mkdir project/src",
    "成功,上層 project 已存在"
   ],
   [
    "mkdir a/b/c",
    "失敗:No such file or directory"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   2
  ],
  "widths": [
   2,
   3
  ]
 },
 "建立:mkdir 與 touch#5": {
  "type": "table",
  "head": [
   "指令",
   "結果"
  ],
  "rows": [
   [
    "mkdir -p a/b/c",
    "連同缺少的上層一起建立"
   ],
   [
    "ls a/b",
    "裡面有 c,三層都建好了"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   2,
   2
  ],
  "widths": [
   2,
   3
  ]
 },
 "建立:mkdir 與 touch#7": {
  "type": "cards",
  "reveal": [
   0,
   1,
   1,
   2
  ],
  "cards": [
   {
    "title": "檔案不存在",
    "points": [
     "touch 順便建立",
     "ls -l 大小是 0,空檔案"
    ]
   },
   {
    "title": "檔案已存在",
    "points": [
     "只更新修改時間",
     "內容完全不會動到"
    ]
   }
  ]
 },
 "複製與移動:cp 與 mv#1": {
  "type": "cards",
  "reveal": [
   0,
   3,
   3
  ],
  "cards": [
   {
    "title": "複製 cp",
    "points": [
     "留一份備份"
    ]
   },
   {
    "title": "移動 mv",
    "points": [
     "放到正確的位置"
    ]
   },
   {
    "title": "改名 mv",
    "points": [
     "搬到同目錄的新名字"
    ]
   }
  ]
 },
 "複製與移動:cp 與 mv#2": {
  "type": "table",
  "head": [
   "寫法",
   "結果"
  ],
  "rows": [
   [
    "cp 來源 目的地",
    "語法"
   ],
   [
    "cp notes.txt notes_backup.txt",
    "複製成新檔名,原檔不變"
   ],
   [
    "cp notes.txt docs/",
    "目的地是目錄:複製進去,檔名不變"
   ],
   [
    "cp a.txt b.txt docs/",
    "一次複製多個,最後是目的地"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "widths": [
   3,
   4
  ]
 },
 "複製與移動:cp 與 mv#5": {
  "type": "table",
  "head": [
   "指令",
   "結果"
  ],
  "rows": [
   [
    "cp project project_backup",
    "被拒絕:-r not specified"
   ],
   [
    "cp -r project project_backup",
    "連同裡面所有東西一起複製"
   ],
   [
    "backup 目錄已存在",
    "變成 project_backup/project"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "widths": [
   3,
   3
  ]
 },
 "複製與移動:cp 與 mv#7": {
  "type": "table",
  "head": [
   "指令",
   "結果"
  ],
  "rows": [
   [
    "mv report.pdf docs/",
    "搬進 docs,原位置就沒有了"
   ],
   [
    "mv a.txt b.txt docs/",
    "一次搬多個,最後是目的地"
   ],
   [
    "mv old_folder archive/",
    "搬目錄不需要 -r"
   ]
  ],
  "reveal": [
   0,
   0,
   1,
   2,
   3
  ],
  "widths": [
   2,
   3
  ]
 },
 "刪除與萬用字元:rm、rmdir、* ?#3": {
  "type": "table",
  "head": [
   "指令",
   "訊息"
  ],
  "rows": [
   [
    "rm nothing.txt",
    "No such file or directory"
   ],
   [
    "rm docs",
    "Is a directory"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   2
  ],
  "widths": [
   2,
   3
  ]
 },
 "刪除與萬用字元:rm、rmdir、* ?#5": {
  "type": "table",
  "head": [
   "選項",
   "特性"
  ],
  "rows": [
   [
    "rm -r",
    "遞迴,整個目錄樹全部刪掉"
   ],
   [
    "rm -f",
    "強制,不詢問、不存在也不報錯"
   ],
   [
    "rm -rf",
    "兩者合併,威力極大"
   ]
  ],
  "reveal": [
   2,
   3
  ],
  "widths": [
   1,
   3
  ]
 },
 "刪除與萬用字元:rm、rmdir、* ?#6": {
  "type": "table",
  "head": [
   "指令",
   "結果"
  ],
  "rows": [
   [
    "rmdir empty_dir",
    "成功,安安靜靜"
   ],
   [
    "rmdir project",
    "failed to remove: Directory not empty"
   ]
  ],
  "reveal": [
   0,
   0,
   0,
   1,
   2,
   2
  ],
  "widths": [
   2,
   3
  ]
 },
 "刪除與萬用字元:rm、rmdir、* ?#7": {
  "type": "table",
  "head": [
   "寫法",
   "意思"
  ],
  "rows": [
   [
    "*",
    "任意長度的任何字元(可以是零個)"
   ],
   [
    "?",
    "剛好一個任意字元,a?.txt 找到 a1.txt、a2.txt"
   ],
   [
    "rm *.tmp",
    "刪除所有 .tmp 結尾的檔案"
   ],
   [
    "cp *.jpg photos/",
    "複製所有 jpg 到 photos"
   ],
   [
    "mv report* archive/",
    "搬動 report 開頭的檔案"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   5
  ],
  "widths": [
   2,
   4
  ]
 },
 "rm 的風險與安全習慣#1": {
  "type": "table",
  "head": [
   "環境",
   "刪除之後"
  ],
  "rows": [
   [
    "Windows / macOS 圖形介面",
    "搬進資源回收筒,隨時救得回來"
   ],
   [
    "Linux 終端機 rm",
    "直接刪除,沒有確認、沒有回收筒"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   2
  ],
  "widths": [
   2,
   3
  ]
 },
 "rm 的風險與安全習慣#2": {
  "type": "table",
  "head": [
   "指令",
   "風險"
  ],
  "rows": [
   [
    "rm -rf /",
    "想刪掉整個系統(新版 rm 預設會拒絕)"
   ],
   [
    "rm -rf ~",
    "刪光家目錄,個人檔案全消失"
   ],
   [
    "rm -rf /home/student /tmp/old",
    "多一個空白,刪到不該刪的"
   ],
   [
    "rm -rf $DIR/*",
    "DIR 是空的就變 rm -rf /*"
   ],
   [
    "sudo rm -rf",
    "連系統保護都擋不住"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   5,
   5
  ],
  "widths": [
   3,
   4
  ]
 },
 "rm 的風險與安全習慣#3": {
  "type": "flow",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "nodes": [
   {
    "label": "先 pwd",
    "sub": "確認所在目錄"
   },
   {
    "label": "先 ls 再 rm",
    "sub": "同樣寫法先 ls"
   },
   {
    "label": "少用 -rf",
    "sub": "刪檔案用 rm 檔名"
   },
   {
    "label": "路徑要明確",
    "sub": "避免 rm *"
   }
  ],
  "layout": "row"
 },
 "rm 的風險與安全習慣#4": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "cards": [
   {
    "title": "rm -i",
    "points": [
     "逐一詢問要不要刪"
    ]
   },
   {
    "title": "先改名或搬走",
    "points": [
     "mv old_data old_data.bak"
    ]
   },
   {
    "title": "先備份",
    "points": [
     "cp -r 再做大規模變更"
    ]
   },
   {
    "title": "不隨手 sudo",
    "points": [
     "權限不足是一種保護"
    ]
   }
  ]
 },
 "rm 的風險與安全習慣#6": {
  "type": "flow",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "nodes": [
   {
    "label": "停止寫入",
    "sub": "避免蓋掉舊資料"
   },
   {
    "label": "從備份還原",
    "sub": "備份、git、雲端同步"
   },
   {
    "label": "回收筒工具",
    "sub": "trash-cli,要額外安裝"
   },
   {
    "label": "通知管理員",
    "sub": "可能有快照或備份"
   }
  ],
  "layout": "row"
 },
 "rm 的風險與安全習慣#7": {
  "type": "table",
  "head": [
   "操作",
   "結果"
  ],
  "rows": [
   [
    "cp new.txt old.txt",
    "old.txt 原本的內容消失"
   ],
   [
    ">",
    "直接覆蓋檔案(追加用 >>)"
   ]
  ],
  "reveal": [
   0,
   1,
   2
  ],
  "widths": [
   2,
   3
  ]
 }
}