Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÔÚlinuxÏ£¬ÈçºÎÔÚCÓïÑÔÖÐʹÓÃÕýÔò±í´ïʽ£¨ÕûÀí£©


  Ò»¸öÕýÔò±í´ïʽµÄ½Ì³Ì¿ÉÒԲο´£¨ÀïÃæÓиö²âÊÔÕýÔò±í´ïʽµÄ¹¤¾ß£©
     http://unibetter.com/deerchao/zhengzhe-biaodashi-jiaocheng-se.htm#ad
 
     ÕýÔò±í´ïÊÇÓÃÀ´Æ¥Åä×Ö·û´®µÄºÃ¶«¶«¡£
   
     Èç¹ûÓû§ÊìϤLinuxϵÄsed¡¢awk¡¢grep»òvi£¬ÄÇô¶ÔÕýÔò±í´ïʽÕâÒ»¸ÅÄî¿Ï¶¨²»»áÄ°Éú¡£ÓÉÓÚËü¿ÉÒÔ¼«´óµØ¼ò»¯´¦Àí×Ö·û´®Ê±µÄ¸´ÔӶȣ¬Òò´ËÏÖ ÔÚÒѾ­ÔÚÐí¶àLinuxʵÓù¤¾ßÖеõ½ÁËÓ¦Óá£Ç§Íò²»ÒªÒÔΪÕýÔò±í´ïʽֻÊÇPerl¡¢Python¡¢BashµÈ½Å±¾ÓïÑÔµÄרÀû£¬×÷ΪCÓïÑÔ³ÌÐòÔ±£¬Óû§Í¬ Ñù¿ÉÒÔÔÚ×Ô¼ºµÄ³ÌÐòÖÐÔËÓÃÕýÔò±í´ïʽ¡£
    
    ±ê×¼µÄCºÍC++¶¼²»Ö§³ÖÕýÔò±í´ïʽ£¬µ«ÓÐһЩº¯Êý¿â¿ÉÒÔ¸¨ÖúC/C++³ÌÐòÔ±Íê³ÉÕâÒ»¹¦ÄÜ£¬ÆäÖÐ×îÖøÃûµÄµ±ÊýPhilip HazelµÄPerl-Compatible Regular Expression¿â£¬Ðí¶àLinux·¢Ðа汾¶¼´øÓÐÕâ¸öº¯Êý¿â¡£
    
    ±¾ÈËʹÓõÄÊÇfedora 8ϵͳ£¬¸Ã°æ±¾ÖоʹøÓÐÕâ¸öº¯Êý¿â£¬ÏÂÃæ½éÉÜÒ»ÏÂÈçºÎʹÓᣣ¨Êµ¼ÊÉÏֻҪʹÓÃmanÃüÁî²éѯ¾Í¿ÉÁ˽âºÜ¶àÓйصÄϸ½ÚÁË£©
    
    ºÜ¶àÔÚÍøÉ϶¼ÓнéÉÜ£¬µ«¶àÓÐЩСµÄ´íÎó£¬ÓÚÊÇÎÒ¸ü¸ÄÁ˲¢ÕûÀíÁËһϡ£
    ҪʹÓÃÕýÔò±í´ïʽµÄº¯Êý¿âÔÚÄãµÄ³ÌÐòÇ°Ãæ°üº¬
    #include <sys/types.h> 
    #include <regex.h>
     
    ÏÂÃæ½éÉÜÏÂÈçºÎʹÓãº
    Ê×ÏÈ£¬±àÒëÕýÔò±í´ïʽ¡£
    ΪÁËÌá¸ßЧÂÊ£¬ÔÚ½«Ò»¸ö×Ö·û´®ÓëÕýÔò±í´ïʽ½øÐбȽÏ֮ǰ£¬Ê×ÏÈÒªÓÃregcomp()º¯Êý¶ÔËü½øÐбàÒ룬½«Æäת»¯Îªregex_t½á¹¹£º
    
    int regcomp(regex_t *preg, const char *regex,int cflags); 
    
    ²ÎÊýregexÊÇÒ»¸ö×Ö·û´®£¬Ëü´ú±í½«Òª±»±àÒëµÄÕýÔò±í´ïʽ£»²ÎÊýpregÖ¸ÏòÒ»¸öÉùÃ÷Ϊregex_tµÄÊý¾Ý½á¹¹£¬ÓÃÀ´±£´æ±àÒë½á¹û£»²ÎÊýcflags¾ö¶¨ÁËÕýÔò±í´ïʽ¸ÃÈçºÎ±»´¦ÀíµÄϸ½Ú¡£ £¨´Ë´¦¿ÉÒÔÓÃman regcomp ÃüÁî²é¿´ÏêϸµÄ½âÊÍ£©
    Èç¹ûº¯Êýregcomp()Ö´Ðгɹ¦£¬²¢ÇÒ±àÒë½á¹û±»ÕýÈ·Ìî³äµ½pregÖк󣬺¯Êý½«·µ»Ø0£¬ÈκÎÆäËüµÄ·µ»Ø½á¹û¶¼´ú±íÓÐijÖÖ´íÎó²úÉú¡£


Ïà¹ØÎĵµ£º

LINUXµÄһЩÃüÁî

# uname -a # ²é¿´ÄÚºË/²Ù×÷ϵͳ/CPUÐÅÏ¢
# head -n 1 /etc/issue # ²é¿´²Ù×÷ϵͳ°æ±¾
# cat /proc/cpuinfo # ²é¿´CPUÐÅÏ¢
# hostname # ²é¿´¼ÆËã»úÃû
# lspci -tv # ÁгöËùÓÐPCIÉ豸
# lsusb -tv # ÁгöËùÓÐUSBÉ豸
# lsmod # Áгö¼ÓÔصÄÄÚºËÄ£¿é
# env # ²é¿´»·¾³±äÁ¿ ×ÊÔ´
# free -m # ²é¿´ÄÚ´æʹÓÃÁ¿ºÍ½»»»Ç ......

Linux ×î¼Ñʵ¼ù ¶ÁÊé×ܽá

1> ʹÓÃCDPATHÉèÖà cd ÃüÁîµÄ¹¤×÷Ŀ¼
[ramesh@dev-db ~]# pwd 
/home/ramesh 
[ramesh@dev-db ~]# cd mail 
-bash: cd: mail: No such file or directory 
[×¢Ò⣺ÔÚµ±Ç°Ä¿Â¼ÏÂÑ°ÕÒMAILĿ¼] 
[ramesh@dev-db ~]# export CDPATH=/etc 
[ramesh@dev-db ~]# cd mail /etc/mail  ......

Linux yum °²×°


 
Yum ÊÇyellowdog updater modifiedµÄËõд¡£yum µÄÀíÄîÊÇʹÓÃÒ»¸öÖÐÐIJֿâ(repository)¹ÜÀíÒ»²¿·ÖÉõÖÁÒ»¸ö distribution µÄÓ¦ÓóÌÐòÏ໥¹Øϵ£¬¸ù¾Ý¼ÆËã³öÀ´µÄÈí¼þÒÀÀµ¹Øϵ½øÐÐÏà¹ØµÄÉý¼¶¡¢°²×°¡¢É¾³ýµÈµÈ²Ù×÷£¬¼õÉÙÁË Linux Óû§Ò»Ö±Í·Í´µÄ dependencies µÄÎÊÌ ......

2010 Linuxѧϰ±Ê¼Ç

°²×°openssh ·þÎñ¶Ë
sudo apt-get install openssh-server openssh-client
 
windows Ï¿ͻ§¶Ë
puTTY
 
 ³£ÓÃÃüÁî:
 
Ò»£®Ls ²é¿´Ä¿Â¼ÃüÁî
Ò»°ã·ÅÔÚhome Ŀ¼ÏÂ
Ls –l /  ¸ùĿ¼ÏµÄÁбí
Ls –a /  ¸ùĿ¼ÏÂËùÓеÄÎļþ
Ls –la  ×éºÏµÄÑ¡Ïî
Ls –l / ......

Linux·þÎñÆ÷ά»¤µÄ¼¸¸öÔ­Ôò

Linux·þÎñÆ÷ËäÈ»Ïà¶ÔÀ´Ëµ±ÈWindwos·þÎñÆ÷ÒªÎȶ¨Ó밲ȫ¡£µ«ÊÇÎȶ¨°²È«µÄLinux·þÎñÆ÷£¬ÈÔÈ»Àë²»¿ªºÏÀíµÄ¼°Ê±µÄά»¤¹¤×÷¡£
¡¡¡¡Ò»¡¢ÈÃÈí¼þ°ü±£³Ö×îеİ汾
¡¡¡¡Linux·þÎñÆ÷µÄÈí¼þ°üÒ²ÈçͬWindwos²Ù×÷ϵͳµÄ²¹¶¡Ò»ÑùÔÚ²»¶ÏµÄÉý¼¶¡£Linux·þÎñÆ÷Èí¼þµÄÉý¼¶Ö÷ÒªÓÐÁ½¸öÄ¿µÄ¡£Ò»ÊÇÔöÇ¿Èí¼þµÄ¹¦ÄÜ£¬¶þÊǽâ¾öһЩÒÑÖªµÄ°²È«Â©¶´¡£Èç ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ