Linux Find ÃüÁָͨÄÏ
ת×Ô£ºhttp://www.oracle.com/technology/global/cn/pub/articles/calish-find.html
Linux Find ÃüÁָͨÄÏ
×÷ÕߣºSheryl Calish
¼òµ¥½éÉÜÕâÒ»ÎÞ´¦²»ÔÚµÄÃüÁîµÄÇ¿´óµÄ·½ÃæÒÔ¼°»ìÂҵķ½Ãæ¡£
2008 Äê 7 Ô·¢²¼
Linux find
ÃüÁîÊÇËùÓÐ Linux ÃüÁîÖÐ×îÓÐÓõÄÒ»¸ö£¬Í¬Ê±Ò²ÊÇ×î»ìÂÒµÄÒ»¸ö¡£ËüºÜÄÑ£¬ÒòΪËüµÄÓï·¨ÓëÆäËû
Linux ÃüÁîµÄ±ê×¼Óï·¨²»Í¬¡£µ«ÊÇ£¬ËüºÜÇ¿´ó£¬ÒòΪËüÔÊÐíÄú°´ÎļþÃû¡¢ÎļþÀàÐÍ¡¢Óû§ÉõÖÁÊÇʱ¼ä´Á²éÕÒÎļþ¡£Ê¹Óà find
ÃüÁÄú²»µ«¿ÉÒÔÕÒµ½¾ßÕâЩÊôÐÔÈÎÒâ×éºÏµÄÎļþ£¬»¹¿ÉÒÔ¶ÔËüÕÒµ½µÄÎļþÖ´ÐвÙ×÷¡£
±¾ÎĵÄÄ¿µÄÊÇ£¬Í¨¹ý¸ÅÊö find
ÃüÁîµÄÓÃ;ºÍDZÄÜ£¬¼ò»¯¸ÃÃüÁîµÄѧϰºÍʹÓá£Í¬Ê±£¬Ëü½«Õë¶Ô find
ÃüÁîµÄijЩ×îÇ¿´óµ«×î»ìÂҵķ½ÃæÌṩһ¸ö»ù±¾µÄÖ¸ÄϺͲο¼¡£
[×¢Ò⣺±¾ÎÄʹÓÃµÄ find °æ±¾ÊÇ GNU °æ±¾£¬Òò´Ë£¬Ä³Ð©Ï¸½Ú¿ÉÄÜÓëÆäËû°æ±¾µÄ find
ÓÐËù²»Í¬¡£]
»ù±¾¸ñʽ
¿ªÊ¼Ö®Ç°£¬ÎÒÃÇÏÈÀ´¿´Ò»Ï find
ÃüÁîµÄ»ù±¾½á¹¹£º
find start_directory test options criteria_to_match
action_to_perform_on_results
ÔÚÒÔÏÂÃüÁîÖУ¬find
½«¿ªÊ¼ÔÚµ±Ç°Ä¿Â¼£¨ÓÓ.”±íʾ£©ÖвéÕÒÈκÎÀ©Õ¹ÃûΪ“java”µÄÎļþ£º
find . -name "*.java"
ÏÂÃæÊǸÃÃüÁîËùÕÒµ½µÄÃüÁîµÄËõÂÔÇåµ¥£º
find . -name "*.java"
./REGEXPvalidate/src/oracle/otnsamples/plsql/ConnectionManager.java
./REGEXPvalidate/src/oracle/otnsamples/plsql/DBManager.java
..
[×¢Ò⣺Èç¹ûÄú´Ó±¾ÎļôÇв¢Õ³ÌùÀ´ÔËÐиà find ÃüÁÄú¿ÉÄÜÐèҪʹÓÃ×Ô¼ºµÄ¼üÅÌÌ滻˫ÒýºÅ (“”)
²ÅÄܵóöÕýÈ·µÄ½á¹û¡£]
ÒÔÏÂÃüÁִÐÐÏàͬµÄ²Ù×÷¡£ÔÚÕâÁ½ÖÖÇé¿öÏ£¬Äú¶¼ÐèÒª¶ÔͨÅä·û½øÐÐתÒåÒÔÈ·±£Ëü´«µÝµ½ find ÃüÁî²¢ÇÒ²»ÓÉ shell
½âÊÍ¡£Òò´Ë£¬Ç뽫ÄúµÄËÑË÷×Ö·û´®·Åµ½ÒýºÅÀ»òÕßÔÚËüÇ°Ãæ¼ÓÉÏ·´Ð±Ïߣº
find . -name \*.java
¾¡¹Ü find
µÄËùÓвÎÊý¾ùΪ¿ÉÑ¡£¬µ«ÊÇÈç¹ûÄúδָ¶¨´ÓÄÄÀ↑ʼËÑË÷£¬ËÑË÷ĬÈϽ«ÔÚµ±Ç°Ä¿Â¼ÖпªÊ¼¡£Èç¹ûÄú²»Ö¸¶¨ÒªÆ¥ÅäµÄ²âÊÔÁ¬½Ó¡¢Ñ¡Ïî»òÖµ£¬ÄúµÄ½á¹û½«²»ÍêÕû»òÕßÎÞÇø
±ð¡£
ÔËÐÐÒÔÏÂÈý¸ö find ÃüÁµÃ³öͬÑùµÄ½á¹û —
µ±Ç°Ä¿Â¼ºÍ
Ïà¹ØÎĵµ£º
ÈÈÐĵãÆÀ£ºÓ²ÅÌ°²×°fedoraµÄ¹æÔò¾ÍÏñÎÒÃǷdz£ÑÇ¿ËÎ÷µÄÕþ²ßÒ»Ñù£¬ ¸æËßÄã²»ÄÜ·¢ËÍyellow¶ÌÐÅ£¬ µ«¾ÍÊDz»¸æËßÄãyellowµÄ³ß¶ÈÊÇʲô£¬ ÄãÖ»ÄÜð×ÅÊÖ»úÍ£»úµÄΣÏÕ£¬²âÊÔÏÂÄÄЩ¶ÌО¿¾¹Éä»ÆÁË¡£ ͨ¹ý²»ÏÂÁ½Î»ÊýµÄÖØÆô£¬ ÃþË÷ÁËÒ»µãµã¹æÔò¡£ OK, ÎÒÏëLinux²»ÊÇgov, °²×°»¹ÊÇÓйæÔò¿ÉÑԵģ¬Ö»ÊÇÎÒÃÇ»¹Ã»ÓÐÕÒµ½Õâ¸öreadme? ´ï ......
Linux»·¾³½ø³Ì¼äͨÐÅ£¨Ò»£©
¹ÜµÀ¼°ÓÐÃû¹ÜµÀ
Ö£ÑåÐË (mlinux@163.com)¹ú·À¿Æ´ó¼ÆËã»úѧԺ
2002 Äê 12 ÔÂ 11 ÈÕ
ÔÚ±¾ÏµÁÐÐòÖÐ×÷Õ߸ÅÊöÁË linux ½ø³Ì¼äͨÐŵļ¸ÖÖÖ÷ÒªÊֶΡ£ÆäÖйܵÀºÍÓÐÃû¹ÜµÀÊÇ×îÔçµÄ½ø³Ì¼äͨÐÅ»úÖÆÖ®Ò»£¬¹ÜµÀ¿ÉÓÃÓÚ¾ßÓÐÇ×Ôµ¹Øϵ½ø³Ì¼äµÄͨÐÅ£¬ÓÐÃû¹ÜµÀ¿Ë·þÁ˹ܵÀûÓÐÃû×ÖµÄÏÞÖÆ£¬Òò´Ë£¬³ý¾ßÓйܵ ......
nginx("engine x")ÊÇÒ»¸ö¸ßÐÔÄܵÄHTTPºÍ·´Ïò´úÀí·þÎñÆ÷£¬ÊÇÓɶíÂÞ˹ÈËIgor Sysoev½¨Á¢µÄÏîÄ¿£¬³¬ÇáÁ¿¼¶£¬³¬¿ì´¦ÀíÄÜÁ¦¡£
ĿǰʹÓõÄnginx°æ±¾ÊÇ0.7.61
nginxµÄ¹ÙÑÔÍøվΪ£ºhttp://nginx.net/
ÏÂÔصØַΪ£ºhttp://sysoev.ru/nginx/nginx-0.7.61.tar.gz
nginxÐèÒªpcreµÄÖ§³Ö£¬ËùÒÔÎÒÃÇÐèÒªÏÂÔØpcre
pcreÈ«ÃûΪPerl Compa ......
¶¯Ì¬»ñÈ¡IP
ÐéÄâ»úµÄÍø¿¨Ê¹ÓÃNATµÄÁ¬½Ó·½Ê½£¨Ã»°ì·¨£¬µ¥Î»Ò»¸ö¶Ë¿ÚÖ»ÔÊÐí1¸öIP£¬Á¬hub¶¼Ã»·¨Óã©
pwd> vi /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTOµÄÖµ¸ÄΪdhcp£¬²¢±£´æ
ifdown eth0; ifup eth0;ÖØÆôÍø¿¨
ifconfig ·¢ÏÖ±»·ÖÅäÁ˸öIP£º10.0.2.15
ping www.163.com ͨ¹ý
¾²Ì¬ÉèÖÃIP
´ýÐø.... ......