linux command

xargs – Linux Command สร้างคำสั่งใหม่จาก ouput ที่ได้ก่อนหน้า

xargs Linux Command – xargs ใช้ในการสร้างคำสั่งใหม่จาก ouput ที่ได้ก่อนหน้า   คำสั่ง <command – output> | xargs <command> ลบ file ชื่อ core ภายใต้ directory /tmp ทั้งหมด $ find /tmp -name core -type f -print | xargs /bin/rm -f or $ find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f   โครงสร้างคำสั่ง  xargs [-0prtx] [-E…

Read More
linux command

whoami – Linux Command คำสั่งแสดงชื่อ user ที่ใช้ login

whoami Linux Command – whoami ใช้ในการแสดงชื่อ user ที่ใช้ login   คำสั่ง whoami $ whoami staff   โครงสร้างคำสั่ง  whoami [OPTION]…   รายละเอียด เป็นคำสั่งที่ใช้ในการแสดงชื่อ user ที่ใช้ login   Option  –help display this help and exit –version output version information and exit   กลุ่มคำสั่ง w, who   Reference: คำสั่ง Unix – Linux Command Linux, Unix   Author: Suphakit Annoppornchai…

Read More
linux command

w – Linux Command คำสั่งแสดง user ที่ login รวมถึงคำสั่งที่ใช้งาน

w Linux Command – w ใช้ในการแสดง user ที่ login รวมถึงคำสั่งที่ใช้งาน   คำสั่ง w $ w 13:48:59 up 308 days, 2:22, 21 users, load average: 3.05, 3.05, 3.59 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT msc pts/0 172.20.91.138 Tue16 20:33m 0.17s 0.17s -bash msc pts/2 172.20.91.79 Mon22 38:38m 0.24s 0.06s sshd: msc [priv] msc pts/3…

Read More
linux command

who – Linux Command คำสั่งแสดงข้อมูล user ที่ login ขณะนั้น

who Linux Command – who ใช้ในการแสดงข้อมูล user ที่ login ขณะนั้น   คำสั่ง who $ who msc pts/0 2017-05-09 16:32 (172.20.91.138) msc pts/2 2017-05-08 22:18 (172.20.91.79) msc pts/3 2017-05-08 13:36 (172.20.91.138) spo pts/5 2017-05-10 13:16 (10.95.120.57) mst pts/6 2017-05-10 11:54 (172.20.91.44) mst pts/7 2017-05-08 09:20 (172.20.91.177) msc pts/8 2017-05-08 23:00 (172.20.91.138) mst pts/9 2017-05-10 13:39 (10.95.120.34) vas…

Read More
linux command

which – Linux Command คำสั่งตำแหน่ง file program

which Linux Command – which ใช้ในการตำแหน่ง file program   คำสั่ง which <program> $ which perl /usr/bin/perl   โครงสร้างคำสั่ง  which [-a] filename …   รายละเอียด เป็นคำสั่งที่ใช้ในการตำแหน่ง file program เช่น binary, soruce หรือ manual page คล้าย find หรือ whereis แต่ความสามารถต่ำกว่า   Option   -a     print all matching pathnames of each argument   กลุ่มคำสั่ง find, whereis  …

Read More
linux command

whereis – Linux Command คำสั่งค้นหาตำแหน่ง file program

whereis Linux Command – whereis ใช้ในการค้นหาตำแหน่ง file program   คำสั่ง whereis <program> $ whereis perl perl: /usr/bin/perl5.22-x86_64-linux-gnu /usr/bin/perl /etc/perl /usr/share/perl /usr/share/man/man1/perl.1.gz   โครงสร้างคำสั่ง  whereis [options] [-BMS directory… -f] name…   รายละเอียด เป็นคำสั่งที่ใช้ในการค้นหาตำแหน่ง file program เช่น binary, source , manual page ที่เก็บบนระบบ   Option  -b Search for binaries. -m Search for manuals. -s Search for sources. -u…

Read More
linux command

wc – Linux Command คำสั่งนับจำนวนคำและบรรทัดจาก file

wc Linux Command – wc ใช้ในการนับจำนวนคำและบรรทัดจาก file   คำสั่ง ตัวอย่าง file1 $ cat file1 aaaaaaaaaaa bbbbbbbbbbb ccccccccccc ddddddddddd eeeeeeeeeee fffffffffff ggggggggggg   แสดงจำนวนบรรทัด, คำ, ขนาด file $ wc file1 7 7 84 file1 7 บรรทัด 7 คำ 84 bytes   โครงสร้างคำสั่ง  wc [OPTION]… [FILE]… wc [OPTION]… –files0-from=F   รายละเอียด เป็นคำสั่งที่ใช้ในการนับจำนวนคำและบรรทัดจาก file   Option -c, –bytes…

Read More
linux command

watch – Linux Command คำสั่ง monitor process ที่ทำงานอยู่

watch Linux Command – watch ใช้ในการ monitor process ที่ทำงานอยู่   คำสั่ง watch <command> $ watch free Every 2.0s: free Wed May 10 13:09:54 2017 total used free shared buff/cache available Mem: 3969412 2304100 834428 66476 830884 1316136 Swap: 1756156 765192 990964 total used free shared buff/cache available Mem: 3969412 2302888 835672 66476 830852 1317392 Swap: 1756156…

Read More
linux command

vdir – Linux Command คำสั่งแสดงข้อมูล directory

vdir Linux Command – vdir ใช้ในการแสดงข้อมูล directory   คำสั่ง vdir $ vdir total 8 -rw-rw-r– 2 root root 6 May 8 17:55 test1 -rw-rw-r– 2 root root 6 May 8 17:55 test2 lrwxrwxrwx 1 root root 5 May 8 17:59 test3 -> test1   โครงสร้างคำสั่ง  vdir [OPTION]… [FILE]…   รายละเอียด เป็นคำสั่งที่ใช้ในการแสดงข้อมูล directory คล้ายคำสั่ง dir และ ls…

Read More
linux command

userdel – Linux Command คำสั่งลบ user ออกจากระบบ

userdel Linux Command – userdel ใช้ในการลบ user ออกจากระบบ   คำสั่ง ลบข้อมูล user พร้อมกับ directory user -r <username> $ userdel -r username   โครงสร้างคำสั่ง  userdel [options] LOGIN   รายละเอียด เป็นคำสั่งที่ใช้ในการลบ user ออกจากระบบ   Option  -f, –force This option forces the removal of the user account, even if the user is still logged in. It also forces userdel…

Read More