Basic การใช้งาน Terminal บน OS X เพื่อประกอบการเรียนการสอนนะครับ

note : folder = directory นะครับ ความหมายประมาณเดียวกัน


การไปยัง folder ภายใน directory ที่เราอยู่

พิมพ์ว่า cd แล้วตามด้วย path ของ folder ปลายทาง เช่น

ถ้าเราอยู่ใน directory /user/ABC ซึ่งใน directory ABC มี folder(directory) ย่อยแบบนี้

ABC
- EFG
- HIJK

ถ้าเราพิพม์ว่า

cd /EFG

เขาจะพาเราเข้าไปยัง folder EFG บนเครื่องเราครับ

ถ้าต้องการออกจาก folder(directory) EFG ให้พิมพ์ว่า

cd แล้วกด enter

เราจะออกจาก directory EFG แล้วมาอยู่ที่ directory ABC เหมือนเดิมครับ


การดูว่าเราอยู่ตรงไหนแล้ว

พิมพ์ว่า

pwd แล้วกด enter

เขาจะแสดง path ที่เราอยู่ล่าสุดขึ้นมาให้ครับ


การแสดงไฟล์ของ folder (directory) ที่เราอยู่

พิมพ์ว่า

ls (ตัวแอลกับเอสเล็ก แล้ว enter)

เขาจะ list ไฟล์ + folder ทั้งหมดของ directory ที่เราอยู่ขึ้นมาครับ

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Allowed HTML tags: <embed> <div> <p> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <br> <img> <hr> <h1> <h2> <h3> <h4> <blockquote> <quote> <pre> <th> <tr> <td> <table> <thead> <tbody>
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
กรอกตัวหนังสือที่เห็นนี้ให้ถูกต้องนะครับ (มีไว้กัน spam)
Image CAPTCHA
Enter the characters shown in the image.