1 / 13

檔案目錄結構

檔案目錄結構. / 根目錄,包含整個 Linux 系統的所有目錄和檔 案。 /usr 用來存放系統指令、應用程式等。像 Windows 底下的 『Program Files』 /var 系統執行時,需要暫時記錄部分資料或 存放一些暫存檔,都會放置在這個目錄裡。 /home 預設用來放置帳號的自家目錄。 /tmp 供全部使用者暫時放置檔案的目錄。. /bin 放置系統使用者操作系統時,所需使用的各種指令。例如 cp 、 login 、 mv 、 rm 等。 /boot 系統啟動時必須讀取的檔案,包含系統核心在內。

Download Presentation

檔案目錄結構

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 檔案目錄結構

  2. / 根目錄,包含整個Linux系統的所有目錄和檔 案。 • /usr 用來存放系統指令、應用程式等。像 Windows 底下的『Program Files』 • /var 系統執行時,需要暫時記錄部分資料或 存放一些暫存檔,都會放置在這個目錄裡。 • /home 預設用來放置帳號的自家目錄。 • /tmp 供全部使用者暫時放置檔案的目錄。

  3. /bin 放置系統使用者操作系統時,所需使用的各種指令。例如 cp、login、mv、rm等。 • /boot 系統啟動時必須讀取的檔案,包含系統核心在內。 • /dev 存放周邊設備代號的檔案。 • /etc 放置與系統設定、管理相關的檔案。 /etc/init.d /etc/rc3.d chkconfig

  4. /mnt 預設有 /mnt/cdrom 和 /mnt/floppy 兩個目錄在這裡,用來做為光碟機和軟碟機掛載點。 • /root 系統管理者的家目錄。 • /sbin 存放系統啟動時需執行的程式。給系統管理原使用的指令

  5. 連結檔的介紹: • 為什麼要使用連結檔 1.節省空間 2.修改任何一個 link 就能讓所有 link 同步修改 3.系統安全 嚴密目錄下開放檔案給人存取

  6. 什麼是 inodes • 檔案建立時 系統會給予一個獨一無二的inode number 讀取某檔案---->讀 inode table ---->block area (block大小預定是4096bytes)去將資料 取出來利用 • 目錄本身也是一個block 內容包含檔案的inode

  7. Hard Link: 1.創造一個新的inode聯到檔案block區 2.不能跨partition 不能連結目錄 3.要將A檔案刪除 必須要將全部的hardlink刪除 才會從硬碟空間才會釋放 • Soft Link: 1.單純指向原本檔案的inode 2.跨partition 可連結目錄 3.當原檔案刪除時 softlink即無法使用

  8. Profile • /etc/profile • http://www.ibiblio.org/mdw/HOWTO/Bash-Prompt-HOWTO/index.html • 自家目錄中的.bash_profile • ~/.bash_logout • ~/.bashrc指向/etc/bashrc 為其他設定

  9. Mount • Mount , mount point , umount • 根目錄 / 是必須掛載的﹐先於其它 mount point 被掛載進來。 • 其它 mount point 必須為已建立的目錄﹐可以任意指定 • 所有 mount point 在同一時間之內﹐只能掛載一次。 • 所有 partition 在同一時間之內﹐只能掛載一次。 • 進行umount ﹐先將工作目錄移到 mount point 之外。

  10. Mount point裡面並不是空的, 那麼mount之後,那麼原目錄下的東西就會暫時的消失 • Mount 軟碟 mount -t ext2 /dev/fd0 /mnt/floppy<==Linux 格式 umount /mnt/floppy<==將軟碟機卸載 • Mount 光碟 mount -t iso9660 /dev/cdrom /mnt/cdrom mount /mnt/cdrom

  11. mount 硬碟 fdisk: <重新開機﹐以讀入更新後的硬碟資訊 > mke2fs:格式化磁區 重開機能立即載入磁區vi /etc/fstab e2label /dev/hdb5 /home 然後將 /etc/fstab /dev/hda5 改為 LABEL=/home 就可以了

  12. 建立開機片 • mkbootdisk --device /dev/fd0 `uname -r ` • 忘記root密碼 LILO 開機選單﹐然後輸入﹕ linux –s 再修改root密碼

  13. 工作排程 • crontab,at • at : 這個工作僅執行一次就從 Linux 系統中的排程中取消; • crontab : 這個工作將持續例行性的作下去 cron 系統程式會在每一分鐘檢查 /etc/crontab 檔案、/etc/cron.d/ 與 /var/spool/cron 目錄

More Related