linuxϵÄed ±à¼Æ÷
linuxϵÄed ±à¼Æ÷
ed ±à¼Æ÷ÊÇ Linux ²Ù×÷ϵͳÏÂ×î¼òµ¥µÄÎı¾±à¼Æ÷¡£ËüÊÇÒÔÐÐΪµ¥Î»¶ÔÎļþ½øÐб༵ıà¼Æ÷£¬¶ø²»Ïñ MS-DOS ϵͳÏ嵀 edit ÄÇÑùÊÇÒÔÕû¸öÆÁÄ»¿ò¼ÜΪµ¥Î»¶ÔÎļþ½øÐб༵ġ£Òò´Ë£¬Èç¹ûÄãÒѾϰ¹ßÁËʹÓà edit ÕâÖÖ·ç¸ñµÄ±à¼Æ÷£¬ÄÇôÄã¿ÉÄÜÐèÒªÒ»¶Îʱ¼ä²ÅÄÜÏ°¹ß ed µÄ·ç¸ñ¡£µ«ÊÇÕâ²¢²»ÖØÒª£¬ÒòΪ ed µÄ¼ò±ãÐÔ¿ÉÒÔʹÄãºÜ¿ìÉÏÊֵġ£
ed ±à¼Æ÷µÄµ÷Óúܼòµ¥£¬Èç¹ûÄãÏëн¨Ò»¸öÎļþ£¬ÄÇôֻÐèÒªÔÚÃüÁîÐд°¿ÚÖÐÇÃÈë ed È»ºó°´Ï»سµ¼ü¼´¿É£º
[titan@localhost titan]$ ed <-
Èç¹ûÄãÏë±à¼Ò»¸öÒѾ´æÔÚµÄÎļþ£¬ÄÇôÄãÖ»ÒªÔÚ ed µÄºóÃæ¿ÕÒ»¸ö£¬È»ºóÇÃÈëÎļþÃû¼´¿É£º
[titan@localhost titan]$ ed filename <-
¼¤»î ed ÃüÁîºó½øÈëµÄÊÇ ed ±à¼Æ÷µÄÃüÁîÐÐ״̬£¬Õâ¿ÉÄÜʹһЩ³õѧÕßÓÐЩ²»Ï°¹ß£¬Èç¹ûÄãÕâʱºòËæ±ãÇÃÈëһЩÄÚÈÝ£¬ÏµÍ³»á·µ»ØÒ»¸ö ?£¬±íʾ²»ÖªµÀÄãÒªÖ´ÐÐʲôÈÎÎñ£º
[titan@localhost titan]$ ed <-
abcde <-
?
ÕâʱºòÄãÒªÃ÷È·¼¸¸ö±à¼Æ÷ÃüÁËüÃÇÊÇ£º
a - ÔÚÎļþµÄĩβÌí¼ÓÐÂÄÚÈÝ
i - ÔÚÎļþµÄ×îºóÒ»ÐÐ֮ǰ²åÈëÐÂÄÚÈÝ
o - °ÑÎļþÊäÈëµÄ×îºóÒ»ÐУ¨²»ÂÛÊÇÔÀ´´æÔڵĻòÕß²åÈëµÄ£©Ìæ»»³ÉÐÂÄÚÈÝ
. - Í˳ö±à¼Îļþģʽ½øÈëÃüÁîÐÐģʽ£¨×¢Ò⣺´Ëʱ²¢Ã»ÓÐÍ˳ö ed ±à¼Æ÷£©
w - ±£´æÎļþ
q - ÕæÕýÍ˳ö ed ±à¼Æ÷
ÏÂÃæÎÒ½«¾Í׿¸¸öÃüÁî¾ÙÀý˵Ã÷һϡ£
[titan@localhost titan]$ ed <- ¼¤»î ed ÃüÁî
a <- ¸æËß ed ÎÒÒª±à¼ÐÂÎļþ
My name is Titan. <- ÊäÈëµÚÒ»ÐÐÄÚÈÝ
And I love Perl very much. <- ÊäÈëµÚ¶þÐÐÄÚÈÝ
. <- ·µ»Ø ed µÄÃüÁîÐÐ״̬
i <- ¸æËß ed ÎÒÒªÔÚ×îºóÒ»ÐÐ֮ǰ²åÈëÄÚÈÝ
I am 24. <- ½«“I am 24.”²åÈë“My name is Titan.”ºÍ“And I love Perl very much.”Ö®¼ä
. <- ·µ»Ø ed µÄÃüÁîÐÐ״̬
c <- ¸æËß ed ÎÒÒªÌæ»»×îºóÒ»ÐÐÊäÈëÄÚÈÝ
I am 24 years old. <- ½«“I am 24.”Ìæ»»³É“I am 24 years old.”£¨×¢Ò⣺ÕâÀïÌæ»»µÄÊÇ×îºóÊäµÄÄÚÈÝ£©
. <- ·µ»Ø ed µÄÃüÁîÐÐ״̬
w readme.text <- ½«ÎļþÃüÃûΪ“readme.text”²¢±£´æ£¨×¢Ò⣺Èç¹ûÊDZà¼ÒѾ´æÔÚµÄÎļþ£¬Ö»ÐèÒªÇÃÈë w ¼´¿É£©
q <- ÍêÈ«Í˳ö ed ±à¼Æ÷
[titan@localhost titan]$ ·µ»Øµ½ Linux ϵͳµÄÃüÁîÐÐ״̬
ÕâÊÇÎļþµÄÄÚÈÝÊÇ£º
[titan@localhost titan]$ cat readme.text <-
Ïà¹ØÎĵµ£º
Æô¶¯mysql: /etc/rc.d/init.d/mysql start
ÐÞ¸ÄÃÜÂë: ¸ñʽ£ºmysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
ʹÓÃÃÜÂëµÇ¼: mysql -u root -p
ÏÔʾÊý¾Ý¿â: show databases;
Ñ¡ÔñÊý¾Ý¿â: use Êý¾Ý¿âÃû;
ÏÔʾ±í: show tables;
ÏÔʾ±í½á¹¹: descibe ±íÃû;
Ô¶³ÌµÇ¼mysqlÐèÒª¿ªÆôÈ ......
LinuxϵĽø³ÌͨÐÅÊֶλù±¾ÉÏÊÇ´ÓUnixƽ̨ÉϵĽø³ÌͨÐÅÊֶμ̳жøÀ´µÄ¡£
Ðò
LinuxϵĽø³ÌͨÐÅÊֶλù±¾ÉÏÊÇ´ÓUnixƽ̨ÉϵĽø³ÌͨÐÅÊֶμ̳жøÀ´µÄ¡£¶ø¶ÔUnix·¢Õ¹×ö³öÖØ´ó¹±Ï×µÄÁ½´óÖ÷Á¦AT&TµÄ±´¶ûʵÑéÊÒ¼°BSD£¨¼ÓÖÝ´óѧ²®¿ËÀû·ÖУµÄ²®¿ËÀûÈí¼þ
·¢²¼ÖÐÐÄ£©ÔÚ½ø³Ì¼äͨÐÅ·½ÃæµÄ²àÖصãÓÐËù²»Í¬¡£Ç°Õ߶ÔUnixÔçÆڵĽø³Ì¼ ......
linuxÐÞ¸ÄÖ÷»úÃûµÄ·½·¨
ÓÃhostnameÃüÁî¿ÉÒÔÁÙʱÐ޸ĻúÆ÷Ãû£¬µ«»úÆ÷ÖØÐÂÆô¶¯Ö®ºó¾Í»á»Ö¸´ÔÀ´µÄÖµ¡£
#hostname //²é¿´»úÆ÷Ãû
#hostname -i //²é¿´±¾»úÆ÷Ãû¶ÔÓ¦µÄipµØÖ·
ÁíÍâÒ»ÖÖ·½·¨¾ÍÊÇÖ®¾ÃÐÞ¸ÄÅäÖÃÎļþ
ÐÞ¸Ä/etc/sysconfig/network ÐÞ¸ÄÕâ¸öÎļþ£¬ÏµÍ³²ÅÓÐЧ
/etc ......
ÏÔʾµ±Ç°ÏµÍ³ÄÚ´æÈÝÁ¿£º
free -m
unameÏÔʾϵͳÐÅÏ¢£º
-a £ºËùÓÐϵͳÏà¹ØÐÅÏ¢
-s £ºÏµÍ³ºËÐÄÃû³Æ
-r £ººËÐÄ°æ±¾
-p £ºcpuÀàÐÍ
-r £ºÓ²¼þƽ̨
½«µ±Ç°ËùÓÐÁª»úºÍ¼àÌýÊý¾ÝÁгöÀ´£º
netstat -a
ÁгöËùÓнø³Ì´ò¿ªµÄÌ×½Ó×ÖÎļþ£º
lsof -u db2inst1 -a -U »ò lsof -u db2inst1 ......
1. ×î³£ÓõÄÃüÁîÁбí
ÏÂÃæÁгöÊ®¸öÔÚʹÓÃlinux¹ý³ÌÖÐʹÓÃƵÂÊ×î¸ßµÄÃüÁî¡£ÕâÀïÖ»×÷¼òµ¥½éÉÜ£¬¾ßÌåÓ÷¨Çë²Î¿¼ºóÃæÄÚÈÝ¡£
cat£¬ÏÔʾÎļþÄÚÈÝ¡£
cd£¬¸Ä±äĿ¼·¾¶¡£
cp£¬¸´ÖÆÎļþ¡£
find£¬²éÕÒÎļþ¡£
grep£¬ËÑË÷¡¢¹ýÂËÐÅÏ¢¡£
ls£¬ÁгöĿ¼ÐÅÏ¢¡£
more£¬·ÖÒ³ÏÔʾ¡£
rm£¬É¾³ýÎļþ»òĿ¼¡£
vi£¬µ÷ÓÃviÎı¾±à¼Æ÷ ......