1 / 16

ความรู้เบื้องต้นเกี่ยวกับคำสั่ง DOS

ความรู้เบื้องต้นเกี่ยวกับคำสั่ง DOS. DOS Command. ผศ.บุรินทร์ รุจจนพันธุ์ . ปรับปรุง 1 สิงหาคม 2556. มหาวิทยาลัยเนชั่น จังหวัดลำปาง http://www. nation.ac.th. คำสั่งภายในของ DOS. คำสั่งภายใน (Internal Command)

jerica
Download Presentation

ความรู้เบื้องต้นเกี่ยวกับคำสั่ง DOS

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. ความรู้เบื้องต้นเกี่ยวกับคำสั่ง DOS DOS Command ผศ.บุรินทร์ รุจจนพันธุ์ . ปรับปรุง 1 สิงหาคม 2556 มหาวิทยาลัยเนชั่น จังหวัดลำปาง http://www.nation.ac.th

  2. คำสั่งภายในของ DOS คำสั่งภายใน (Internal Command) เป็นคำสั่งที่เรียกใช้ได้ทันทีตลอดเวลาที่เครื่องเปิดใช้งานอยู่ เพราะคำสั่งประเภทนี้ถูกบรรจุลงในหน่วยความจำหลัก (RAM) ตลอดเวลา หลังจากที่ Boot DOS ส่วนมากจะเป็นคำสั่งที่ใช้อยู่เสมอ เช่น CLS, DIR, COPY, REN เป็นต้น ข้อมูลจาก http://www.school.net.th/library/create-web/10000/generality/10000-9156.html

  3. คำสั่งภายนอกของ DOS • คำสั่งภายนอก (External Command) • คำสั่งนี้จะถูกเก็บไว้ในดิสก์หรือแผ่น DOS คำสั่งเหล่านี้จะไม่ถูกเก็บไว้ในหน่วยความจำ เมื่อต้องการใช้คำสั่งเหล่านี้คอมพิวเตอร์จะเรียกคำสั่งเข้าสู่หน่วยความจำ ถ้าแผ่นดิสก์หรือฮาร์ดดิสก์ไม่มีคำสั่งที่ต้องการใช้อยู่ก็ไม่สามารถเรียกคำสั่งนั้น ๆ ได้ ตัวอย่างเช่น คำสั่ง FORMAT, DISKCOPY, TREE, DELTREE เป็นต้น ข้อมูลจาก http://www.school.net.th/library/create-web/10000/generality/10000-9156.html

  4. ฝึกเรียนรู้การใช้คำสั่ง DOS เบื้องต้น Press, Start Type “cmd” 1 2 Press, Start All Programs Accessories Command Prompt

  5. ฝึกเรียนรู้การใช้คำสั่ง DOS เบื้องต้น (3/3) เข้า root directory หรือ c:\ นั่นเอง DOS> CD\ ดูรายชื่อแฟ้มในห้องปัจจุบัน DOS> DIR เข้าห้องที่มีคำสั่งภายนอกของ DOS DOS> CD c:\windows\system32 ดูรายการคำสั่งในห้องนี้ DOS> dir *.exe เรียกใช้ write.exe DOS> write กลับเข้า root directory DOS> CD\

  6. ฝึกเรียนรู้การใช้คำสั่ง DOS เบื้องต้น (2/3) สร้างแฟ้มแบบ text DOS> EDIT x.txt ดูข้อมูลในแฟ้ม x.txt DOS> TYPE x.txt คัดลอกแฟ้ม x.txt ได้แฟ้ม y.txt DOS> COPY x.txt y.txt สร้างห้อง z DOS> MKDIR z ย้ายแฟ้มเข้าห้อง z DOS> MOVE *.txt z ดูรายชื่อแฟ้มในห้อง z DOS> DIR z ลบทุกแฟ้มในห้อง z DOS> DEL z\*.*

  7. ฝึกเรียนรู้การใช้คำสั่ง DOS เบื้องต้น (3/3) แสดงการตอบสนองจาก facebook DOS> PING www.facebook.com แสดงข้อมูล IP ของเครื่อง DOS> IPCONFIG แสดงรายการพอร์ทที่เปิดรับบริการ DOS> NETSTAT -na แสดงเบอร์เครื่องที่ให้บริการ ก่อนถึงเครื่องเป้าหมาย DOS> TRACERT www.facebook.com แสดงรายการตัวแปลที่กำหนดไว้ DOS> SET แสดงรายการโปรแกรมใน task DOS> tasklist

  8. การเริ่มต้นโหลดโปรแกรม (Booting) DOS = Disk Operating System Booting Method - Cold Boot - Warm Boot Booting File - IO.SYS ไม่ถูกใช้งานใน WinXP - MSDOS.SYS ไม่ถูกใช้งานใน WinXP - COMMAND.COM พบใน c:\windows\system32\ ข้อมูลจาก http://www.sukhothaitc.ac.th/faifa/article/dos1.htm

  9. กลุ่มคำสั่งของ DOS 1. ดิสก์ และแฟ้ม (Disk &File) 2. โครงสร้างไดเรกทรอรี่ (Directory Structure) 3. การประมวลผลในแบท (Batch Processing) 4. ทั่วไป (General) ข้อมูลจาก http://www.thaiall.com/assembly/internalcmd.htm ข้อมูลจาก http://aec.snru.ac.th/UserFiles/File/aec/handbook%20com/10%20Dos.doc

  10. 1. Disk และ File (1/4) 1. dirแสดงรายชื่อแฟ้มใน directory 2. rename เปลี่ยนชื่อแฟ้ม 3. copyคัดลอกแฟ้ม 4. xcopyคัดลอกไดเรกทรอรี่ (Directory) 5. diskcopyคัดลอกดิสก์ 6. chkdskเช็คดิสก์ 7. attribจัดการเกี่ยวกับ attibute ของแฟ้ม 8. labelเปลี่ยนลาเบล (Label)

  11. 2. Directory Structure (2/4) 1. cd เปลี่ยน directory 2. md สร้างไดเรกทรอรี่ (Directory) 3. rd ลบไดเรกทรอรี่ (Directory) 4. tree แสดงโครงสร้างไดเรกทรอรี่ (Directory) 5. path กำหนดเส้นทาง

  12. 3. Batch Processing (3/4) 1. call เรียก batch file อื่น 2. echo แสดงข้อความ 3. if เลือกทำตามเงื่อนไข 4. goto ไปยังลาเบล (Label) 5. rem หมายเหตุ 6. pause หยุดรอ 7. for ทำซ้ำ 8. shift เลื่อนสำหรับ %0 ถึง %9

  13. 4. General (4/4) 1. dateตั้งวันที่ 2. timeตั้งเวลา 3. prompt ตั้งเครื่องหมาย prompt ใหม่ 4. cls ลบจอภาพ 5. typeแสดงข้อมูลในแฟ้มข้อความ (Text File) 6. set กำหนดตัวแปร 7. verแสดงเลขรุ่นของระบบปฏิบัติการ

  14. ตัวอย่างการใช้คำสั่ง DOS (1/3) Start, Run, Cmd dir /? dir > a dir a echo aa echo aa > a echo aa >> a type a copy con a pause del a

  15. ตัวอย่างการใช้คำสั่ง DOS (2/3) Start, Run, Cmd md a deltree a cd \ cd a cd .. cd ..\b rd a dir a /w/s echo y | del c:\windows\command.com

  16. ตัวอย่างการใช้คำสั่ง DOS (3/3) ipconfig /all tracert www.uni.net.th ping www.uni.net.th telnet www.uni.net.th 21 telnet www.uni.net.th 80 GET /index.html netstat -an net start set set z=abc taskkill /f /pid 123

More Related