Linuxѧϰ֮ѧϰshell½Å±¾
×î½üÒ»¶Îʱ¼ä,¶Ôд²©¿Í±È½Ï¸ÐÐËȤ,µ±È»,ÊÇдÕâÒ»ÀàµÄ²©¿Í»á¶àÒ»µã,±¾È˱ȽÏÀÁ,¿´ÊéÑо¿µÄ¹ý³ÌÒ²¾Í±È½ÏÂý,Õâ¸öʱ¼ä,ÎÒÀ´µ½ÁËshell½Å±¾ÕâÀï,¹À¼Æ,¶ÔÎÒÀ´Ëµ,²»ÊǸöÄÑÊÂ,µ«ÊÇ,ÀïÃæ´í×Û¸´ÔÓµÄÃüÁî½»¼¯,Ó¦¸Ã²ÅÊǽű¾ÀïµÄ¾«»ª,Ï£Íû×Ô¼º¿ÉÒÔÔÚÕâÀïÄÜѧµ½Ò»Ð©×Ô¼ºÐèÒªÕÆÎյļ¼ÄÜ,һֱûÓÐÕâ¸öÐÄ̬ȥ¿´Êé,Õâ¶Îʱ¼äRP±¬·¢,ͻȻÀ´ÁËÐÄÇé,³Ë»ú»á¸Ï½ô¶ÁÊé±Ê¼ÇÈ¥. ÔÚlinuxÖÐ,½Å±¾µÄÔËÓÿÉÒÔΪÄãʡϺܶ෽±ã,µ±È»,ÕâЩ¶«Î÷,ÎÒÒ²ÊÇ¿´Êé˵µÄ,¾ßÌåµÄʵ¼ÊÀûÓÃ,ÎÒѹ¸ùÒ²²»ÔõôÀí½â,Óиöʦ¸¸¸æËßÎÒ,ÄãÔÚʵ¼ùµÄ¹ý³ÌÖÐ×ÔÈ»»áÀí½âÃ÷°×,Õâ¸öµÄ¾ßÌåÓÃ;,ÐÅÈÎËû,ËûÊǸßÊÖ,Ò²¶à¿÷Õâλʦ¸¸µÄÖ¸µã,ÎÒ²ÅÓÐÁËÕâЩ»ù´¡,ѧϰ½Å±¾,×ÔȻҪ´ÓµÚÒ»¸ö½Å±¾¿ªÊ¼,¶øÕâ¸ö½Å±¾,´ó¼Ò¶¼ºÜÊìϤ,ɶÄØ,°¥,ÓÖÊÇ"hello world",û°ì·¨,Äã·³,ÎÒÒ²·³,µ«ÊÇ,Õâ¸öÊÇû°ì·¨,´ó¼Ò¶¼Õâô¸É,ºÎ¿ö,Ò»¿ªÊ¼,Äã¾ÍдÄÇЩºÜ³¤ºÜ³¤µÄ´úÂë,¿ªÍæЦ,¸ù±¾²»¿ÉÄÜ,°¡,»¹ÊÇÀÏÀÏʵʵ¿´¿´ÈçºÎд,È»ºó×Ô¼º±àÒ»¸öɽկµÄ,û°ì·¨,ɽկµÄ±È½ÏÏñ,Ò²»áÓÐÓ¡Ïó,ºÃ,¿ª¹¤,ÇÆÇÆÎÒÃǵÚÒ»¸öÔÚlinuxϵĽű¾ÊÇÈçºÎдµÄ. ÎÒÃÇÔÚtmpĿ¼ÄÚÀ´½øÐвÙ×÷,°²È«.,¿ÉÒÔÂÒÀ´Ò»ÏÂ,ÔÚÆäËûĿ¼Àï,²»Ð¡ÐÄɾµôÁ˹ؼüÎļþ¾ÍÂé·³ÁË 1¡¢ÔÚtmpÖд´½¨Ò»¸öĿ¼,ͬʱ½øÈë¸ÃĿ¼--¡·mkdir scripts;cd scripts
¼ûµ½Ã»,ÒÔºó±ðÄÇôɵ,µÈµ½µÚ¶þÐÐÔÚÊäÈëcd ½øÈ¥Ïà¹ØĿ¼À²,Ö±½ÓÃüÁîÐÐÖ®¼ä,ʹÓÃ;À´½øÐÐ·Ö¸î ºÃ,ÏÖÔÚ¿ªÊ¼,µÚÒ»¸ö½Å±¾µÄ±àд£º ´´½¨Ò»¸ösh½Å±¾Îļþ£ºvi sh01.sh ½øÈëÁ˱à¼×´Ì¬,È»ºó°´Ò»ÏÂa,½øÈë±à¼Ä£Ê½,ÊäÈëÏà¹Ø´úÂë,Èçͼ ÓµÓе۹úÒ»ÇУ¬½ÔÓпÉÄÜ¡£»¶Ó·ÃÎÊphome.net
Õâ¸öʱºò,Äã°´escÍƳö±à¼Ä£Ê½,»Øµ½Ò»°ãģʽµÄʱºò,ÊäÈ룺wq,±£´æÍ˳ö
È»ºó°´»Ø³µ¾Í¿ÉÒÔÍ˳ö,½Ó×Å,ÄãÔÚÃüÁîÐÐÊäÈë sh sh01.sh¾Í¿ÉÒÔ¿´µ½½á¹û
OK,±àÒëʱÍê³ÉÁË,ÎÒÃÇÏÖÔÚ¶Ô´úÂë·ÖÎöһϠΪÁËÈÃÎÒÃǵĴúÂë±È½ÏÈÝÒ×ʶ±ð,ÎÒ½øÈëvi sh01.shÖ®ºó,ÔÚÒ»°ãģʽÏÂ,ÎÒÊäÈë:set nu,À´½øÐв鿴
ÕâÑù¶Ô½Å±¾Óиö±àºÅ,¾Í·½±ãµãÀ² Ó¦¸Ã×¢ÒâµÄÊÇÄÄЩÄØ,µÚÒ»¾ä,ΪɶҪÕâôд,ÄãÓõÄÊÇbash,µ±È»ÒªÓ¦ÓÃÕâ¸öÀ²,µÚÒ»¾äÊDZíÃ÷,ÄãÓõÄÊÇbashÓï·¨.×¢ÒâÀ²,Èç¹ûûÓÐÕâÒ»¾ä,ÄãËù±àдµÄ³ÌÐò,½«ÓпÉÄÜÎÞ·¨±àÒë. µÚ¶þµã,Óд󲿷ÖÄÚÈÝÇ°Ã涼¼ÓÁË#ºÅ,Õâ¸öÊÇÓÃÀ´×¢Ê͵Ä,ÓÃÀ´¸øÄã¿´Çå³þ,Õâ¸ö³ÌÐòÖ÷ÒªÊÇÓÃÀ´¸ÉÂïµÄ,µ±È»,ÔÚÄñ¸çµÄÊé±¾Àï,ÓÐÕâôһ¸ö˵·¨,˵ÐèÒªÑø³ÉÕâôһ¸öÏ°¹ß 1¡¢ÄÚÈÝÓ빦ÄÜ 2¡¢°æ±¾ÐÅÏ¢ 3¡¢×÷ÕßÓëÁªÏµ·½Ê½ 4¡¢ÎļþµÄ´´½¨ÈÕÆÚ 5¡¢ÀúÊ·¼Ç¼ µÚÈýµã£ºÓ¦¸Ã¾ÍÊÇÕâ¸ö×µÄPATH·¾¶ÁË,¿´ÆðÀ´ËƺõºÜ¸´ÔÓ,Æäʵ,²¢²»ÊÇ,Õâ¸öÊÇÒýÓÃbashµÄ·¾¶,ÊÇÒª¼ÇµÃµÄ,µ«ÊÇÔõôȥ¼ÇÄØ,ÎÒÊÇÕâÑùÈ¥¼ÇÒäµÄ /bin:/sbin: / usr/bin: /usr/sbin: /usr/local/bin: /usr/local/sbin: ~/bin ¼ûµ½Ã»£¿·Ö¿ª¼ÇÒä,ÕâÑùµÄ»°,¾ÍÈÝÒ×ÁË,µ±È»,ÄãÒªÃ÷°×,²»ÒªÓпոñ,ÕâÀï,ÒÔÃâÔì³ÉÂé·³,ÎÒÕâÀïÕâÑù,ÊÇÏëÈôó¼Ò¿´Çå³þ,Ôõôȥ¼ÇÒäËü. ÓµÓе۹úÒ»ÇУ¬½ÔÓпÉÄÜ¡£»¶Ó·ÃÎÊphome.net Õâ¸ö¾ÍÊǵÚÒ»¸ö½Å±¾µÄ±àд,½ÓÏÂÀ´,ÎÒÃǽøÈëµÚ¶þ¸ö½Å±¾µÄѧϰ,Õâ¸öºÜʹÓÃŶ,ÎÒÃÇÔÚXP°²×°Èí¼þµÄʱºò,×ÜÊÇÎÊÎÒÃÇ,Äã°²×°µÄ·¾¶ÊÇÔÚÄÄÀÕâ¸öʱºòÄã¾Í»áÑ¡ÔñÒ»¸ö×Ô¶¨Òå»òÕßĬÈϵÄ,µ±ÄãÈ·¶¨Íê±ÏÖ®ºó,Èí¼þ»á¸æËßÄã,ÄãÑ¡ÔñµÄ·¾¶ÊÇÄÄÀï,ÄÇô,ÎÒÃǽñÌì¾ÍÀ´Ñ§Ï°Ò»ÏÂ,Õâ¸öËõ¼õ°æµÄÌáʾ,ÊÇÔõôÌáʾµÄ Õâ¸ö½Å±¾ÊÇ vi sh02.sh
OK,±àÒëÒ»ÏÂ,¾Í¿ÉÒÔÁË
±¾Îijö×Ô ¡°ÀÁèºáÐС± ²©¿Í,ÇëÎñ±Ø±£Áô´Ë³ö´¦http://jackicy.blog.51cto.com/422269/429017 ÓµÓе۹úÒ»ÇУ¬½ÔÓпÉÄÜ¡£»¶Ó·ÃÎÊphome.net |
ÁèÖڿƼ¼×¨ÒµÌṩ·þÎñÆ÷×âÓᢷþÎñÆ÷Íйܡ¢ÆóÒµÓʾ֡¢ÐéÄâÖ÷»úµÈ·þÎñ£¬¹«Ë¾ÍøÕ¾£ºhttp://www.lingzhong.cn ΪÁ˸ø¹ã´ó¿Í»§Á˽â¸ü¶àµÄ¼¼ÊõÐÅÏ¢£¬±¾¼¼ÊõÎÄÕÂÊÕ¼¯À´Ô´ÓÚÍøÂç,ÁèÖڿƼ¼×ðÖØÎÄÕÂ×÷ÕߵİæȨ£¬Èç¹ûÓÐÉæ¼°ÄãµÄ°æȨÓбØҪɾ³ýÄãµÄÎÄÕ£¬ÇëºÍÎÒÃÇÁªÏµ¡£ÒÔÉÏÐÅÏ¢ÓëÎÄÕÂÕýÎÄÊDz»¿É·Ö¸îµÄÒ»²¿·Ö,Èç¹ûÄúҪתÔر¾ÎÄÕÂ,Çë±£ÁôÒÔÉÏÐÅÏ¢£¬Ð»Ð»! |
- Fireworks¼òµ¥ÖÆ×÷¸öÐÔµÄÎÄ×ÖLOGO
- LinuxÖÐcpÖ±½Ó¸²¸Ç²»ÌáʾµÄ·½·¨
- Photoshop·¾¶Óë¸ß¹â¹´»ÒÕÊõ·äÄñ
- ASP.NET 2.0ʵÏÖÎÞˢпͻ§¶Ë»Øµ÷
- linux Load average¸ºÔØÏêϸ½âÊÍ
- Photoshop½Ì³Ì:Éè¼ÆÖÆ×÷2010ÐÂÄêºØ¿¨
- Java EE/J2EEÃæÏò¶ÔÏó±à³ÌÖ®µÀ - ±à³ÌÈëÃÅÍø
- Photoshop°ÑmmµÄµ¥ÑÛƤ±ä³ÉË«ÑÛƤ
- PerlÓïÑÔ±à³ÌÌØÊâ¼¼ÇÉ
- ¹ØÓÚÍøÒ³±íµ¥ÊµÏÖºÍÍøÒ³²¼¾ÖÈçºÎÔËÓÃ±íµ¥