linux³õѧ֮ËöËé֪ʶµãÕûÀíÈý
Èí¼þ°²×°ÃüÁî
1. tar
tar ÃüÁîµÄ»ù±¾Ó÷¨Îª£º
tar [Ñ¡Ïî] ÎļþÃû
³£ÓõÄÑ¡Ïî°üÀ¨
-c ´´½¨Ò»¸öеĵµ°¸Îļþ
-t ²é¿´µµ°¸ÎļþµÄÄÚÈÝ
-x ·Ö½âµµ°¸ÎļþµÄÄÚÈÝ
-f Ö¸¶¨µµ°¸ÎļþµÄÃû³Æ
-v ÏÔʾ¹ý³ÌÐÅÏ¢
-z ²ÉÓÃѹËõ·½Ê½
¾ÙÀý
1 tar -czf oracle.tar.gz /u01/app/oracle /etc/oratab /home/oracle
¸ÃÃüÁ/u01/app/oracle Ŀ¼ÏµÄËùÓÐÎļþ /etc/oratab ÎļþºÍ
/home/oracleĿ¼ÏµÄËùÓÐÎļþºÏ²¢µ½oracle.tarÎļþÖÐ ²¢²ÉÓÃѹËõ·½Ê½
2 tar -tzf oracle.tar.gz
¸ÃÃüÁîÁгö¹éµµÎļþ oracle.tarÖеÄËùÓÐÎļþÁбí
2. rpm
1£©°²×°£º
rpm -i rpm°üÃû
ÀýÈç
rpm -i tomcat4.rpm
¸ÃÃüÁ°²×° TomcatÈí¼þ²¢½øÐÐÏà¹ØϵͳÅäÖÃ
2£©Éý¼¶£º
rpm -U rpm°üÃû
ÀýÈç
rpm –U tomcat4.rpm
¸ÃÃüÁÉý¼¶ TomcatÈí¼þ²¢½øÐÐÏà¹ØϵͳÅäÖÃ
3£©²é¿´ÒÑ°²×°µÄÈí¼þ£º
ÒªÏëÁгöÒѾ°²×°µÄÈ«²¿Èí¼þ°ü ¿ÉÒÔͨ¹ýÒÔÏÂÃüÁî
rpm -qa
¿ÉÒÔʹÓà g r e pÃüÁîÖ¸¶¨Èí¼þ°üµÄÃû³Æ »òÕß²¿·ÖÃû³Æ ÈçÏÂËùʾ
rpm -qa | grep 'tomcat'
¸ÃÃüÁÁгö°üÃûÖаüº¬ tomcatµÄÈí¼þ°ü
´ËÍâ ÒªÏëÕÒ³öij¸öÌض¨µÄÎļþµ½µ×ÊÇÊôÓÚÄĸöÈí¼þ°üµÄ ¿ÉÒÔÊäÈë
rpm -qf filename
ÆäÖÐ filename ÊÇ×¼±¸Òª²éÕÒÆä¹éÊôµÄÎļþÃû³Æ
ÒªÏë²é³öij¸öÒѾ°²×°µÄÈí¼þ°üµÄ¹¦ÄÜ ¿ÉÒÔÓÃÈçÏÂÃüÁî
rpm -qi packagename
ÆäÖÐ packagename ÊÇÒª²éÕÒÆäÓÃ;µÄÈí¼þ°üÃû³Æ
4£©É¾³ý°²×°µÄÈí¼þ
rpm -e packagename
ÆäÖÐ ackagename ÊÇÒª²éɾ³ýµÄÈí¼þ°üÃû³Æ
Îļþ²é¿´ºÍ±à¼ÃüÁî
catÃüÁî
cat file1.txt ÏÔʾ file1.txt ÎļþµÄÄÚÈÝ
cat file1.txt file2.txt ÏÔʾ file1.txt ºÍ file2.txt ÎļþµÄÄÚÈÝ
cat -n file1.txt ÏÔʾ file1.txt ÎļþµÄÄÚÈÝ Í¬Ê±ÏÔʾÐкÅ
viÃüÁî
viÊÇ Visual Interface µÄ¼ò³Æ
ViÓÐÈýÖÖ»ù±¾¹¤×÷ģʽ£ºÃüÁîÐÐģʽ¡¢ Îı¾ÊäÈëģʽ¡¢Ä©ÐÐģʽ
ÃüÁîÐÐģʽ £º
ÈκÎʱºò ²»¹ÜÓû§´¦ÓÚºÎÖÖģʽ Ö»Òª°´Ò»Ï ESC ¼ü ¼´¿Éʹ vi ½øÈë
ÃüÁîÐÐģʽ µ±ÔÚ shell»·¾³ÏÂÊäÈë viÃüÁîÆô¶¯ vi±à¼Æ÷ʱ Ò²ÊÇ´¦ÓÚ¸ÃģʽÏÂ
ÔÚ¸ÃģʽÏ Óû§¿ÉÒÔÊäÈë¸÷ÖֺϷ¨µÄ vi ÃüÁî ÓÃÓÚ¹ÜÀí×Ô¼ºµÄÎĵµ ´Ëʱ
´Ó¼üÅÌÉÏÊäÈëµÄÈκÎ×Ö·û¶¼±»µ±×÷±à¼ÃüÁîÀ´½âÊÍ ÈôÊäÈë
Ïà¹ØÎĵµ£º
WindowsϵͳÆäʵºÍLinuxϵͳÓÐÏàËƵĵط½£¬WindowsϵͳÎļþ¡¢Ä¿Â¼µÄÊôÐÔÓÐÖ»¶Á¡¢Òþ²Ø£¬¶øLinux Ò²Ò»Ñù¡£
¡¡¡¡LinuxÖУ¬Ã¿Ò»¸öÎļþ¶¼¾ßÓÐÌض¨µÄÊôÐÔ¡£Ö÷Òª°üÀ¨ÎļþÀàÐͺÍÎļþȨÏÞÁ½¸ö·½Ãæ¡£¿ÉÒÔ·ÖΪ5ÖÖ²»Í¬µÄÀàÐÍ£ºÆÕͨÎļþ¡¢Ä¿Â¼Îļþ¡¢Á´½ÓÎļþ¡¢É豸Îļþ
ºÍ¹ÜµÀÎļþ¡£ÉϺ£Êý¾Ý»Ö¸´
¡¡¡¡ËùνµÄÎļþȨÏÞ£¬ÊÇÖ¸¶ÔÎļþµÄ·ÃÎ ......
Linux ¶¯Ì¬Á´½Ó
Linux ÖеÄÓ¦ÓóÌÐòÒÔÒÔÏÂÁ½ÖÖ·½Ê½Ö®Ò»Á´½Óµ½Íⲿº¯Êý£ºÒªÃ´ÔÚ¹¹½¨Ê±Ó뾲̬¿â£¨ lib*.a £© ¾²Ì¬µØÁ´½Ó£¬²¢ÇÒ½«¿â´úÂë°üº¬ÔÚ¸ÃÓ¦ÓóÌÐòµÄ¿ÉÖ´ÐÐÎļþÀҪôÔÚÔËÐÐʱÓë¹²Ïí¿â£¨ lib*.so £© ¶¯Ì¬µØÁ´½Ó¡£Í¨¹ý¶¯Ì¬Á´½Ó×°ÈëÆ÷£¬½«¶¯Ì¬¿âÓ³Éä½øÓ¦ÓóÌÐòµÄ¿ÉÖ´ÐÐÄÚ´æÖС£ÔÚÆô¶¯Ó¦ÓóÌÐò֮ǰ£¬¶¯Ì¬Á´½Ó×°ÈëÆ÷½«ËùÐ ......
linuxÖнӿÚÉèÖ÷½·¨
Ò»¡¢ ÉèÖýӿÚipµØÖ·
1. ipv4µØÖ·
1) ²é¿´½Ó¿ÚÅäÖÃ
ÃüÁ
ifconfig ²é¿´ËùÓнӿڵ ......
ÓÉÓÚÎÒÃÇÊÇÔÚ¾ÖÇøÍøÄÚÓûúÆ÷×ö²âÊÔ·þÎñÆ÷£¬»úÆ÷±È½Ï½ôÕÅ£¬¶øIPµØÖ·µ¹ÊDZȽϸ»Ó࣬ËùÒÔʹÓÃͬһ»úÆ÷µÄ¶àIPÀ´ÅäÖÃÐéÄâÖ÷»ú¾ÍÊÇÒ»¸ö²»´íµÄÑ¡ÔñÁË¡£ÒòΪÎÒ ÏëÔÚͬһ»úÆ÷ÉϽøÐÐÁ½¸öϵͳµÄ²¿Êð£¬ËùÒÔ¾ÍʹÓÃapacheÀ´½øÐÐÐéÄâÖ÷»úµÄ¶àIPÅäÖÃÁË¡£ºÃÁË£¬¿ªÊ¼ÎÒÃǵÄÅäÖÃÖ®ÂðÉ~~~
Ê×ÏȾÍÊÇapac ......
linuxÖ®shell¼ò½é
shellÊÇÓû§ºÍlinuxϵͳ֮¼äµÄ½Ó¿Ú£¨ºÜÏñwindowsϵͳϵÄdos£©£¬linuxÓжàÖÖshell£¬È±Ê¡µÄʹÓÃbash
shell³£ÓõÄ3ÖÖÀàÐÍ£º
1¡¢Bourne shell£¨sh£©£ºUNIXÉÏ×î³õʹÓõÄÀàÐÍ£¬linuxϵͳȱʡµÄshellÊÇBourne Again shell£¨bash£©£¬ËûÊÇBourne shellµÄÀ©Õ¹£¬Ôö¼ÓÁ˺ܶàÌØÐÔ£¬»¹°üº¬ÁËC shellºÍKorn shellµÄÓÅ ......