1 / 11

系統管理指令

系統管理指令. 基本指令 ( 與檔案相關 ). 基本指令 ( 與目錄相關 ). 查詢 檔案內容 的指令. ls (-al) 指令的應用. cp/ mv / rm (1). cp 語法: cp 來源 (source) 目的 (destination) cp /test1/file1 /test3/file2 參數 -a :複製目錄下所有檔案 -r :遞迴處理(針對目錄) - i :目的檔覆蓋前,會先詢問. cp/ mv / rm (2). mv :檔案移動 語法: mv 來源 (source) 目的 (destination)

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. 基本指令(與檔案相關)

  3. 基本指令(與目錄相關)

  4. 查詢檔案內容的指令

  5. ls(-al)指令的應用

  6. cp/mv/rm(1) • cp • 語法: • cp來源(source) 目的(destination) • cp /test1/file1 /test3/file2 • 參數 • -a:複製目錄下所有檔案 • -r:遞迴處理(針對目錄) • -i:目的檔覆蓋前,會先詢問

  7. cp/mv/rm(2) • mv:檔案移動 • 語法: • mv來源(source) 目的(destination) • mv /test1/file1 /test3/file2 • 參數 • -a:複製目錄下所有檔案 • -r:遞迴處理(針對目錄) • -i:目的檔覆蓋前,會先詢問

  8. cp/mv/rm(3) • rm(remove) • 語法: • rm檔案 • rm /test1/file1 • 參數 • -f:強制刪除,不會出現警告訊息 • -r:遞迴處理(針對目錄) • -i:刪除前會詢問

  9. mkdir/rmdir(1) • mkdir(make directory) • 語法: • mkdir檔案 • mkdir /fax • 參數 • -m:設定新建目錄的權限 • mkdir –m 660 accounting • 預設777

  10. mkdir/rmdir(2) • rmdir(remove directory) • 語法: • rmdir檔案 • rmdir /fax • 特性:執行前需先確認目錄中沒有任何檔案

  11. 練習題 • 請利用putty,在「自己帳號」下,建立一個目錄,且內有二個檔案(建立目錄、檔案都需下指令) • 將上題的檔案,利用vi編輯器進行編輯且儲檔 • 建立第二個目錄(需用指令) • 利用cp指令去複製第一題的目錄到第三題的目錄 • 移除第二個目錄中的第一個目錄的一個檔案(需用指令) • 需將操作過程,利用print Screen 貼到word檔,以檢查

More Related