FreeBSD/Linux ϸ÷ÖÖ²éÕÒÌæ»»×Ö·û´®µÄ°ì·¨
ÔÚFreebsdÏÂÎÒÃdz£³£Òª½øÐÐ×Ö·û´®µÄ²éÕÒÌæ»»£¬ÓÐÔÚvim±à¼Æ÷ÀïÃæ½øÐеģ¬Ò²ÓÐÔÚshellϽøÐеģ¬ÕâÑùµÄÊÂÇé³£Óöµ½£¬µ«ÊÇÿ´Î¶¼»á
¸Ðµ½
ÓÐЩ¸ÅÄîÄ£ºý£¬ÓÈÆä¶ÔÀàËÆawk¡¢sed¡¢grep¡¢findµÈÃüÁîµÄ¾ßÌå²ÎÊýʹÓÃÎÊÌâÉÏÀÏÊǺýÍ¿£¬ÏÂÃæÊÕ¼¯¼¸¸ö³£Óõķ½·¨£¬ÊµÔÚ²»ÄÜÀí½â¾ÍËÀ¼ÇËãÁË£¡
1¡¢ÔÚviÖÐʹÓõIJéÕÒÌæ»»·½·¨
ÀûÓà :s ÃüÁî¿ÉÒÔʵÏÖ×Ö·û´®µÄÌæ»»¡£¾ßÌåµÄÓ÷¨°üÀ¨£º
:s/str1/str2/ ÓÃ×Ö·û´® str2 Ìæ»»ÐÐÖÐÊ״γöÏÖµÄ×Ö·û´® str1
:s/str1/str2/g ÓÃ×Ö·û´® str2 Ìæ»»ÐÐÖÐËùÓгöÏÖµÄ×Ö·û´® str1
:.,$ s/str1/str2/g ÓÃ×Ö·û´® str2 Ìæ»»ÕýÎĵ±Ç°Ðе½Ä©Î²ËùÓгöÏÖµÄ×Ö·û´® str1
:1,$ s/str1/str2/g ÓÃ×Ö·û´® str2 Ìæ»»ÕýÎÄÖÐËùÓгöÏÖµÄ×Ö·û´® str1
:g/str1/s//str2/g ¹¦ÄÜͬÉÏ´ÓÉÏÊöÌæ»»ÃüÁî¿ÉÒÔ¿´µ½£ºg ·ÅÔÚÃüÁîĩ⣬±íʾ¶ÔËÑË÷×Ö·û´®µÄÿ´Î³öÏÖ½øÐÐÌæ»»£»²»¼Ó g£¬±íʾֻ¶ÔËÑË÷×Ö·û´®µÄÊ״γöÏÖ½øÐÐÌæ»»£»g ·ÅÔÚÃüÁͷ£¬±íʾ¶ÔÕýÎÄÖÐËùÓаüº¬ËÑË÷×Ö·û´®µÄÐнøÐÐÌæ»»²Ù×÷¡£
2¡¢ÔÚshellÖÐʹÓÃfind½áºÏgrep½øÐÐÎļþµÄÌæ»»
# find ./ -exec grep str1 ‘{}’ \; -exec sed -i.bak s/str1/str2/g ‘{}’ \;
ÉÏÃæÃüÁî¿ÉÒÔÔÚµ±Ç°Ä¿Â¼Ï£¨°üÀ¨×ÓĿ¼£©²éÕÒ°üº¬str1µÄÎļþ£¬×Ô¶¯Ìæ»»³Éstr2£¬²¢ÇÒÉú³ÉÔ´ÎļþµÄbakÎļþ
http://www.toplee.com/blog/52.html
http://www.toplee.com/blog/51.html#pp1
Ïà¹ØÎĵµ£º
from: http://www.linuxeden.com/html/develop/20090702/66531.html
bashÅжϽø³Ì´æÔÚµÄ3ÖÖ·½·¨
1¡¢ps -p
ps -p ¸ù¾Ý¸ø¶¨µÄpid²ÎÊýÅжÏÊÇ·ñÓÐÕâ¸ö½ø³Ì¡£
Èç¹ûÓÐÕâ¸ö½ø³ÌÕý³£Í˳ö£¬Í˳öÖµ0£»
Èç¹ûûÓÐÕâ¸ö½ø³ÌÒì³£Í˳ö£¬Í˳öÖµ1¡£
apple@ubuntu:~$ ps -p 2442
PID TTY ......
[root@proxyo ~]#
¶øÎÒÒª½«ÖмäµÄproxyo¸Ä³Ésearch
1. vi /etc/hosts
[root@proxyo ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 ......
Linux°æ±¾£ºfedora 11 ÄÚºË2.6
1.È·¶¨°²×°vsftpd¡£
££ su
££ yum install vsft ......
ÃæÊÔÌâÊÇÒ»Ì×±ÊÊÔÌ⣬±È½Ï¾µä£¨±Õ¾í£¬100·ÖÖÓÍê¾í£¬×îºÃд³ö½âÌâ²½Ö裩£¬ÈôÄãÄÜ´ð¶Ô°Ù·ÖÖ®Æß°ËÊ®£¬ËµÃ÷ÄãÒ»Ö»½Å̤½øÁËlinux±à³ÌµÄ´óÃÅ£¬ÈôÄãÄÜ´ð¶Ô°Ù·ÖÖ®¾ÅÊ®ÒÔÉÏ£¬ÄãÊÕÎÒ×öµÜ×Ó£¨¿ÉÁ¯¿ÉÁ¯ÎÒ°É£©£¬ÄãÈô²»¼°¸ñ£¬ÄǾ͸úÎÒÒ»Ñù£º²ËÄñ£¡
Ò»¡¢»ù´¡Ì⣺
¡¡¡¡1.ÇëÁоٳöÄãÓà ......
http://bbs.54master.com/redirect.php?tid=272658&goto=lastpost
·¢±íÓÚ 2008-9-21 16:31
linux Ö®topÃüÁîÏê½â
linux
, top
, Ïê½â
, ÃüÁî
Ç°Á½ÌìÓÐÈËÎʵ½£¬¾Í°ÑÕâ¸ö»ù±¾µÄÓÖ¹¦ÄÜÇ¿´óµÄÃüÁî
Ìù³öÀ´£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú£¡£¡£¡
linux
Ö®topÃüÁîÏê½â
topÃüÁîÊÇLinuxϳ£ÓõÄÐÔÄÜ·ÖÎö¹¤¾ß
£¬Äܹ»ÊµÊ±ÏÔÊ¾ÏµÍ ......