ºìÁªLinuxÃÅ»§
Linux°ïÖú

ʹÓúÃÄãµÄLinux¼üÅÌ

·¢²¼Ê±¼ä:2008-05-05 13:03:45À´Ô´:ºìÁª×÷Õß:SMuonon
ÕýÈ·µÄʹÓüüÅÌÉϵķûºÅ¿ÉÒÔÔÚ°ïÖúÄãÔÚ±àд¼òµ¥½Å±¾Ê±³ä·ÖÓ¦Óø÷ÖÖ¼¼ÇÉ

[Tab] ÓÃÓÚ×Ô¶¯²¹ÆëÒ»¸öÃüÁîºÍ·¾¶»òÎļþÃû

[root@localhost ~]# user ÔÚÊäÈëuser ºóÁ¬°´¼üÅÌÉϵÄ[Tab]¼üÁ½Ï£¬¿ÉÒÔ½«ÒÔuser¿ªÍ·µÄÃüÁîÁгö

[root@localhost ~]# usera ÔÚÊäÈëuseraºóÁ¬°´¼üÅÌÉϵÄ[Tab]¼üһϣ¬¿ÉÒÔ½«ÒÔusera¿ªÍ·µÄÃüÁîuseraddÃüÁî×Ô¶¯²¹Æë

[root@localhost ~]# useradd ÔÚÊäÈëuseraddºóÁ¬°´¼üÅÌÉϵÄ[Tab]¼üÁ½Ï£¬¿ÉÒÔ½«µ±Ç°Ä¿Â¼ÏµÄËùÓÐÎļþºÍĿ¼Áгö

~ Õâ¸ö·ûºÅ´ú±íÓû§×Ô¼ºµÄhomeĿ¼

[root@localhost ~]# cd /

[root@localhost ~]# pwd

[root@localhost ~]# cd ~

[root@localhost ~]# pwd

! ÔÚÒ»¸öÃüÁîÇ°¼ÓÉÏÕâ¸ö·ûºÅ¿ÉÒÔÔÚÃüÁîµÄÀúÊ·¼Ç¼Öе÷ÓÃÉÏÒ»¸öÒÔÕâ¸öÃüÁͷµÄÃüÁî [root@localhost ~]# find /root/install.log

[root@localhost ~]# file /root/install.log

[root@localhost ~]# !f ÔÚ¸öÃüÁµ÷ÓÃfile /root/installÕâ¸ö²éÕÒÎļþµÄÃüÁî

[root@localhost ~]# !fi ÔÚ¸öÃüÁµ÷ÓÃfile /root/installÕâ¸ö²éÕÒÎļþµÄÃüÁî

[root@localhost ~]# !fin ÔÚ¸öÃüÁµ÷ÓÃfind /root/installÕâ¸ö²éÕÒÎļþµÄÃüÁî

$ ÓÃÓÚÒýÓÃÒ»¸ö±äÁ¿

[root@localhost ~]# myhost=www.liuziyang.cn

[root@localhost ~]# echo $myhost

& ÔÚÒ»¸öÃüÁî½áβ±íʾ½«ÈÎÎñ·ÅÔÚºǫ́ÔËÐÐ

% ÓÃÓÚ±íʾһ¸öÈÎÎñ£¨ÈÎÎñ²»Êǽø³Ì£©±àºÅ

[root@localhost ~]# while true; do echo hello >> /dev/tty2 ; sleep 1; done&

[root@localhost ~]# while true; do echo www.liuziyang.cn >> /dev/tty2 ; sleep 1; done&

[root@localhost ~]# [ctrl]+[alt]+[F2] ÕâÀï±íʾÇл»µ½µÚ¶þ¸ö¿ØÖÆ̨/dev/tty2,²é¿´Êä³ö½á¹û

ÔÚÿִÐÐÏÂÃæµÄÒ»¸öÃüÁîºó¶¼ÔÚ[ctrl]+[alt]+[F1]ºÍ[F2]¼ä½øÐÐÇл»À´¿´Ò»¸ö½á¹ûµÄ±ä»¯

[root@localhost ~]# jobs

[root@localhost ~]# fg %1

[root@localhost ~]# [ctrl]+z ÕâÀï°´¼üÅÌÉϵÄ[ctrl]ºÍzÕâÑùµÄ×éºÏ

[root@localhost ~]# jobs [root@localhost ~]# kill %2

[root@localhost ~]# jobs

[root@localhost ~]# bg %1

[root@localhost ~]# jobs

[root@localhost ~]# kill %1 `` ±íʾһ¸öÃüÁî»ò½Å±¾ '' ±íʾһ¸ö×Ö·û´® "" ±íʾһ¸ö×Ö·û´®

×¢Òâ¹Û²éÿһ¸öÃüÁîµÄÊä³ö½á¹û

[root@localhost ~]# echo `hostname`

[root@localhost ~]# echo 'hostname'

[root@localhost ~]# echo "hostname" | ¹ÜµÀ·ûºÅ,ÓÃÓÚÔÚÒ»¸öÃüÁîÓï¾äºó½øÐйýÂË

[root@localhost ~]# ls -l /etc | more

[root@localhost ~]# cat /etc/passwd | awk -F: '{print $7}' | sort | uniq

^ Æ¥Åä×Ö·û´®Ê×

$ Æ¥Åä×Ö·û´®Î²

> ¶¨Ïò·ûºÅ

< ¶¨Ïò·ûºÅ

>> ×·¼Ó·ûºÅ

×¢Òâÿ¸öÃüÁîµÄÊä³ö½á¹û¶Ô±È

[root@localhost ~]# grep ^root < /etc/passwd > result1.txt

[root@localhost ~]# cat result1.txt

[root@localhost ~]# grep bash$ < /etc/passwd > result1.txt

[root@localhost ~]# grep bash$ < /etc/passwd > result2.txt

[root@localhost ~]# cat result1.txt

[root@localhost ~]# cat result2.txt

[root@localhost ~]# grep root < /etc/passwd >> result2.txt

[root@localhost ~]# cat result2.txt

ÏÈдÕâЩ°É£¬¶à¶¯ÊÖʵ¼ù¾ÍÄÜÀí½âÕâЩÃüÁî²¢¿ÉÒÔÓ¦Óõ½Êµ¼ÊÖС£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ