2014年2月20日 星期四

答客問(同學的疑問與討論)

  • 首次上課:
    • 如各位同學有任何問題、建議、或是單純不曉得老師在講什麼,除了上課時間歡迎隨時打斷我外,也可:
      • 在office hours直接來3312B找老師
      • 寄信給老師約時間討論。
    • 要是作業遇到困難,也歡迎找老師討論。
  • 重導向符號 > 及 >>
    • some-command > file-name: 將some-command的結果寫到file-name裡(覆蓋檔案原來內容)。
    • some-command >> file-name: 將some-command的結果附加到file-name檔尾,不覆蓋原本資料。
  • Permissions on directories
    • The execution permission of a directory allows users/programs to "pass through" the directory.
    • The read permission of a directory allows users/programs to read the contents of the directory.
    • So, if we want to read the contents of a file /a/b/c.txt, we need the execution permission of /a and /a/b, and the read permission of /a/b/c.txt
    • If we want to list the files in /a/b, we need the execution permission of /a and the read permission of /a/b.
    • It is possible that we can list the files within a directory (since we have the read permission), but cannot read a file in that directory (since we don't have execute permission). Vice versa, it is also possible that we can read a file in a directory, but cannot list the files within that directory.

沒有留言:

張貼留言