9. 命令轉向(Redirection)與管線(Pipe)
• 命令轉向
– 從 A 命令讀取檔案 file1.txt
• A < file1.txt
– 將 A 命令的執行結果寫入 file1.txt
• A > file1.txt 建立新檔
• A >> file1.txt 附加到檔案
– 將 A 命令的執行結果寫入 nul 裝置 (意即不顯示輸出)
• A >nul
• 命令管線
– 從 A 命令執行的結果 pipe 給 B 命令
• A | B
9
11. 查詢可用指令
• 使用 help 命令
– help
– help dir
– dir /?
• 線上文件查詢
– Index of the Windows CMD command line | SS64.com
– Command Availability Across Microsoft Operating Systems
– Command Prompt Reference | dosprompt.info
11
12. 常用命令
• cls 清除螢幕
• cd 進入特定資料夾
• mkdir 建立資料夾
• rmdir 刪除資料夾
• del 刪除檔案
• ren 更改檔案名稱
• type 顯示檔案內容
• echo 輸出一段字串內容
• copy 複製檔案
• dir 列出目錄檔案
• pushd 儲存目前路徑以供 POPD 命令使用
• popd 變更到用 PUSHD 命令儲存的路徑
• more 將輸出自動進行分頁處理,例如 dir|more
• shutdown 將電腦關機或重開機 12
50. 聯絡資訊
• The Will Will Web
記載著 Will 在網路世界的學習心得與技術分享
– http://blog.miniasp.com/
• Will 保哥的技術交流中心 (臉書粉絲專頁)
– http://www.facebook.com/will.fans
• Will 保哥的噗浪
– http://www.plurk.com/willh/invite
• Will 保哥的推特
– https://twitter.com/Will_Huang