1 / 12

การใช้งานลีนุกซ์ขั้นพื้นฐาน

การใช้งานลีนุกซ์ขั้นพื้นฐาน. ธวัชชัย เอี่ยมไพโรจน์. คำสั่งประเภท Reading & Navigation. คำสั่งขอความช่วยเหลือ man /usr/man/ (man1, man2, …. ,man9) Section ใน manual page: NAME ชื่อ และคำอธิบายสรุป SYNOPSIS ใช้อย่างไร DESCRIPTION รายละเอียด FILES ชื่อ files ที่เกี่ยวข้อง

mab
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. คำสั่งประเภท Reading & Navigation • คำสั่งขอความช่วยเหลือ man /usr/man/ (man1, man2, …. ,man9) • Section ใน manual page: NAME ชื่อ และคำอธิบายสรุป SYNOPSIS ใช้อย่างไร DESCRIPTION รายละเอียด FILES ชื่อ files ที่เกี่ยวข้อง SEE ALSO man pages อื่น ที่สัมพันธ์กัน DIAGNOSTICS BUGS AUTHOR

  3. /etc/man.conf • configuration data for man MANBIN pathname MANPATH manpath_element [corresponding_catdir] MANPATH_MAP path_element manpath_element

  4. Navigating & Searching File System • Move to Different Directories : cd • Knowing Where You Are : pwd • Searching Directories for Matching Files : find $ find /etc -name man.conf -print /etc/man.conf $ find /usr -name '*.ps' -print

  5. Navigating & Searching File System (cont.) • Finding Files with : whereis $ whereis find find: /usr/bin/find /usr/man/man1/find.1.gz • Locating Files with : locate $ locate *.ps • Getting Command Summaries : whatis : apropos $ whatis apropos $ apropos sort

  6. Reading Directories & Files • Listing Directories with : ls : • Listing Directory with : dir : vdir : $ dir $ vdir • Listing & Combining Files with : cat : • Reading Files with : more : • Browsing Files with : less :

  7. Reading : Beginning : End : of Files • คำสั่ง head $ head /usr/local/apache/logs/access_log $ head -3 /usr/local/apache/logs/access_log • คำสั่งtail $ tail /usr/local/apache/logs/access_log $ tail -3 /usr/local/apache/logs/access_log

  8. คำสั่งในกลุ่ม Manipulation & Searching • Creating Files with : touch $ touch newfile $ touch oldfile $ touch -t 0625120001 oldfile • Delete file with : rm : • Create Directories with: mkdir : • Removing Directories with : rmdir : • Renameing Files with : mv :

  9. คำสั่งในกลุ่ม Manipulation & Searching (ต่อ) • Copying with : cp : • Create Hard Link : ln : $ ln oldfile nextfile • Create Symbolic Link : ln : $ ln -s oldfile linkfile lrwxrwxrwx 1 f44404 users 7 Jun 28 19:53 linkfile -> oldfile

  10. Midnight Commander • ทดลองใช้ $ mc • exit เพื่อออกจากโปรแกรม

  11. Regular Expressions ? * Matches any character ? Or . Matches a single character [xxx] or [x-x] Mattches a character in a range of characters \x Matchaes a character such as ? Or \ ^pattern Matches pattern to the beginning of a line $pattern Matches pattern to the end of a line • Searching Inside Files with : grep :

  12. Compressing & Uncompressing Files • Creating Archives with : tar : • Creating : cpio : [Same as tar] • Compressing Files with : gzip : gunzip : $ gzip aa -rw-r--r-- 1 f44404 users 38 Jun 28 20:11 aa.gz • Compress Files with : compress : uncompress : $ compress p01.ppt rw-r--r-- 1 f44404 users 11320 Jun 15 00:05 p01.ppt.Z

More Related