Results 1 to 4 of 4

Thread: คำสั่งที่คุณใช้บ่อย command unix

  1. #1
    Administrator asylu3's Avatar
    Join Date
    Jun 2000
    Location
    Thailand
    Posts
    3,557


    คำสั่งที่คุณใช้บ่อย command unix

    อยากให้ทุกคนมาช่วยๆกัน สร้างคู่มือ unix ฉบับผู้ใช้ด้วยกันนะครับใช้คำส่งไหนบ่อย แล้วใช้ทำอะไรก็ช่วยๆ กัน post ครับเผ่อมือใหม่จะได้เรียนรู้

    สำหรับผมมีดังนี้
    ls -al (list ดูรายชื่อ directory และ file ต่างๆ)
    ls -L (เหมือนด้านบนแต่จะแสดง directory ขึ้นต้นด้วย / เช่น /pub )
    cp [source] [target] (copy file จากต้นทางไปปลายทางเช่น cp a.txt b.txt)
    mv [source] [target] (ย้าย file จากต้นทางไปปลายทาง สามารถใช้เปลี่ยนชื่อ file ได้ด้วยในเวลาเดียวกันเช่น mv a.txt ../b.txt หมายความว่าย้าย a.txt ถอยออกไปหนึ่งระดับ directory)

    พอแค่นี้ก่อนเดี๋ยวคนอื่นไม่ได้ post

  2. #2
    nuttech
    Guest


    Re: คำสั่งที่คุณใช้บ่อย

    top ใช้ดู resource ของเครื่องและ show Process ต่างๆ

    dd ใช้ในการ convert และ copy file (ใช้ในกรณี backup data ทั้ง HDD โดยไม่ต้องใช้ tar)

  3. #3
    Senior Member lordbsd's Avatar
    Join Date
    Sep 2002
    Location
    Atsugi, Kanagawa, Japan
    Posts
    180


    Re: คำสั่งที่คุณใช้บ่อย

    ls -lt = sort by time
    ls -lu = show last access
    ls -lR = recursive
    ls -lS = sort by size (large first)

    ...much more (อ่านแมนเอาดิ)

    lsattr = ดู permission พิเศษ
    chattr = เปลี่ยน permission พิเศษ

    find {dir} | grep name = ค้นหาไฟล์ที่ต้องการ

    for a in *; do echo $a; cat $a | grep {keyword}; done
    = ค้นหา content ของ ไฟล์



    [Edited by lordbsd on 10-30-2002 at 01:45 PM GMT]

  4. #4
    Senior Member lordbsd's Avatar
    Join Date
    Sep 2002
    Location
    Atsugi, Kanagawa, Japan
    Posts
    180


    Re: คำสั่งที่คุณใช้บ่อย

    dmesg = ดู kernel message
    uname -a = ดูว่า ระบบเราคืออะไร
    kill -HUP 1 = restart inittab
    top = ดู process
    tail -f {filename} = เอาไว้ดู log file แบบ following
    เช่น tail -f /var/www/logs/access_log
    เอาไว้ดูว่ามีใครเข้าเว็บเราบ้าง

    du -s . = เช็คว่า dir นี้ กิน พ.ท. ไปเท่าไรแล้ว
    มีอะไรอีกอ่ะ ก็เยอะอ่ะครับ พรรณาไม่หมด ขอให้ลองอ่านหนังสือ
    UNIX In nutshell และ LINUX in nutshell ดูนะครับ
    น่าเสียดายที่ ดร.บวร บอกว่า หนังสือของ O'Reilly เป็นหนังสือตลาด เลยไม่ค่อยมีหนังสือดีๆ ในคณะเราให้อ่านสักเท่าไรนะครับ น้องๆอาจจะต้องซื้อมาเอง การศึกษาคือการลงทุนครับ ซื้อไว้ไม่ผิดหวัง

Similar Threads

  1. MS patent looks just like Unix command, critics howl
    By newsbot in forum World Hacking/Security News
    Replies: 0
    Last Post: 13-11-2009, 02:00 AM
  2. Replies: 0
    Last Post: 20-06-2008, 11:26 AM
  3. Learning the UNIX OS
    By larnoy in forum Linux, Unix , Window เกี่ยวกับ OS ต่างๆ
    Replies: 1
    Last Post: 18-01-2008, 04:37 PM
  4. เทคนืค Port Forwarding จาก Unix -> Unix
    By newsbot in forum Operating System, Server and Networking
    Replies: 0
    Last Post: 06-10-2006, 07:45 PM

Members who have read this thread : 0

Actions : (View-Readers)

There are no names to display.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •