C.A.Lee
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- robots: index, follow tags: NCTU, CS, 共筆 description: 交大資工課程學習筆記 lang: zh-tw dir: ltr breaks: true disqus: calee GA: UA-100433652-1 --- # 系統管理實務--易志偉 - 大家在做作業時,也可以紀錄作業一下自己的步驟 - 前面的 bonus 最好盡力做滿 # **友站** - [2015-SA](https://hackpad.com/-2015-56AUapur5Yc) - [2014-SA](https://hackpad.com/2014-SA-OSVYgtAZXfD) # COURSE 1 # COURSE 2 - CISSP (Physical and Environmental Security): 管理者指標 - Shell works: Fetch command -> Analyze -> Execute - used RC: logout/login, source, . .tcshrc - PS1: shell rc 的樣式, PS2: 下一行的樣式 - $val or ${val} - *, ?, [...] -> 要有中間的, [!...] -> 不要有中間的 - # 註解, && 前面成功再做後面, || 前面沒成功再做後面的, & 背景執行 - Dirs, popd , pushd 阿這好難排好看啊QQ還是要來試用 HackMD O_____O # **COURSE 5** - File System - ls -l: drwx--x--x link owner group size time name - Architecture: pathname, file tree, mounting, file types - Application <-> Kernel <-> Hardware - main components - namespace - api - security model - implementation - object - files and dir - hardware device ( /dev/... ) - process info - IPC (Interprocess communication channel) 網路的東西 - SHM (shared memory segments) - man hier - /bin /sbin /usr/bin /usr/sbin - /usr - /lib /libexec /usr/include - /mnt - /usr/src - /etc /usr/local/etc - /var - /dev - mount disk - disk partition - network file servers - mount point - fstab # **HW 1** 看看投影片就好了 other group 記得加 wheel (或寫 0) ←寫0好像沒效(Re:對啊) sudo install: Visual to edit sudoer's power # **HW 2** 善用 [sed & awk](https://goo.gl/kiqiY3) && [正規表示法](https://regexcrossword.com/) <- 正規練習網站 **Filesystem Statistic** 會用到的指令 ls grep cut sort awk awk用法 ~~會寫C就會寫awk~~ BEGIN {} 在讀檔前執行{}內的code /regex/{} 檔案裡符合regex的那行才會執行{}內的code END {} 整個檔案讀完才執行{}內的code ~~題目限制不能用分號~~,要把expression用{}包起來,效果跟; 一樣 更正:awk裡面還是可以用分號,問過助教了 應該不會超過300字元 **Mango Browser** dialog --inputbox, --msgbox, --yesno --menu 跑https網頁: sudo pkg install ca_root_nss 在放shell script的變數時, 第一次放的等號兩旁不能有空格@@ (e.g. variable=10, 不能 variable = 10) 比較保險的方式:變數都用 " " 包起來 (e.g. "$(lalala)") 檢查url: 可以用 [正規](http://mropengate.blogspot.tw/2015/02/regular-expression.html) 也可以試著直接用 [ping](http://www.cyberciti.biz/tips/simple-linux-and-unix-system-monitoring-with-ping-command-and-scripts.html) 的 (ping 只能ping domin, ex: [http://nasa.cs.nctu.edu.tw/sap](http://nasa.cs.nctu.edu.tw/sap) 中, http:// 跟 /sap 都要拔掉) 有些載點有空白([http://nasa.cs.nctu.edu.tw/nap/2015](http://nasa.cs.nctu.edu.tw/nap/2015)) 可以把空白鍵置換成%20 # **HW3** **Micro Computer Center** FreeBSD Handbook NFS : [https://www.freebsd.org/doc/handbook/network-nfs.html](https://www.freebsd.org/doc/handbook/network-nfs.html) For NFS Server Create NFS Server from zpool $ zfs set sharenfs="-alldirs -maproot=nobody sabsd saduty" vol/home $ zfs set sharenfs="-ro sabsd saduty" vol/data $ zfs set sharenfs="-ro sabsd saduty" vol/admin Ref : [](https://docs.oracle.com/cd/E26502_01/html/E29007/gayne.html)[https://docs.oracle.com/cd/E26502_01/html/E29007/gayne.html](https://docs.oracle.com/cd/E26502_01/html/E29007/gayne.html) For NFS Client autofs NFS Server 斷線之後會重新掛載 /etc/rc.conf autofs_enable="YES" /etc/auto_master #/net -hosts -nobrowse,nosuid,intr /net /etc/auto_net /etc/auto_net home -rw,soft sahome:/vol/home data -ro,soft sahome:/vol/data admin -ro,soft sahome:/vol/admin

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    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

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully