Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

LinuxµÄshell±à³Ì


 
Shell±¾ÉíÊÇÒ»¸öÓÃCÓïÑÔ±àдµÄ³ÌÐò£¬ËüÊÇÓû§Ê¹ÓÃLinuxµÄÇÅÁº¡£Shell¼ÈÊÇÒ»ÖÖÃüÁîÓïÑÔ£¬ÓÖÊÇÒ»ÖÖ³ÌÐòÉè¼ÆÓïÑÔ¡£×÷ΪÃüÁîÓïÑÔ£¬Ëü½»»¥Ê½µØ½âÊͺÍÖ´ÐÐÓû§ÊäÈëµÄÃüÁ×÷Ϊ³ÌÐòÉè¼ÆÓïÑÔ£¬Ëü¶¨ÒåÁ˸÷ÖÖ±äÁ¿ºÍ²ÎÊý£¬²¢ÌṩÁËÐí¶àÔڸ߼¶ÓïÑÔÖвžßÓеĿØÖƽṹ£¬°üÀ¨Ñ­»·ºÍ·ÖÖ§¡£ËüËäÈ»²»ÊÇLinuxϵͳºËÐĵÄÒ»²¿·Ö£¬µ«Ëüµ÷ÓÃÁËϵͳºËÐĵĴ󲿷ֹ¦ÄÜÀ´Ö´ÐгÌÐò¡¢½¨Á¢Îļþ²¢ÒÔ²¢Ðеķ½Ê½Ð­µ÷¸÷¸ö³ÌÐòµÄÔËÐС£Òò´Ë£¬¶ÔÓÚÓû§À´Ëµ£¬shellÊÇ×îÖØÒªµÄʵÓóÌÐò£¬ÉîÈëÁ˽âºÍÊìÁ·ÕÆÎÕshellµÄÌØÐÔ¼«ÆäʹÓ÷½·¨£¬ÊÇÓúÃLinuxϵͳµÄ¹Ø¼ü¡£¿ÉÒÔ˵£¬shellʹÓõÄÊìÁ·³Ì¶È·´Ó³ÁËÓû§¶ÔLinuxʹÓõÄÊìÁ·³Ì¶È¡£
¡¡¡¡Ò»¡¢Ê²Ã´ÊÇshell
¡¡¡¡µ±Ò»¸öÓû§µÇ¼Linuxϵͳ֮ºó£¬ÏµÍ³³õʼ»¯³ÌÐòinit¾ÍΪÿһ¸öÓû§ÔËÐÐÒ»¸ö³ÆΪshell(Íâ¿Ç)µÄ³ÌÐò¡£ÄÇô£¬shellÊÇʲôÄØ£¿È·ÇÐÒ»µã˵£¬shell¾ÍÊÇÒ»¸öÃüÁîÐнâÊÍÆ÷£¬ËüΪÓû§ÌṩÁËÒ»¸öÏòLinuxÄں˷¢ËÍÇëÇóÒÔ±ãÔËÐгÌÐòµÄ½çÃæϵͳ¼¶³ÌÐò£¬Óû§¿ÉÒÔÓÃshellÀ´Æô¶¯¡¢¹ÒÆð¡¢Í£Ö¹ÉõÖÁÊDZàдһЩ³ÌÐò¡£
¡¡¡¡µ±Óû§Ê¹ÓÃLinuxʱÊÇͨ¹ýÃüÁîÀ´Íê³ÉËùÐ蹤×÷µÄ¡£Ò»¸öÃüÁî¾ÍÊÇÓû§ºÍshellÖ®¼ä¶Ô»°µÄÒ»¸ö»ù±¾µ¥Î»£¬ËüÊÇÓɶà¸ö×Ö·û×é³É²¢ÒÔ»»ÐнáÊøµÄ×Ö·û´®¡£shell½âÊÍÓû§ÊäÈëµÄÃüÁ¾ÍÏóDOSÀïµÄcommand.comËù×öµÄÒ»Ñù£¬Ëù²»Í¬µÄÊÇ£¬ÔÚDOSÖУ¬command.comÖ»ÓÐÒ»¸ö£¬¶øÔÚLinuxϱȽÏÁ÷ÐеÄshellÓкü¸¸ö£¬Ã¿¸öshell¶¼¸÷ÓÐǧÇï¡£Ò»°ãµÄLinuxϵͳ¶¼½«bash×÷ΪĬÈϵÄshell¡£
¡¡¡¡¶þ¡¢¼¸ÖÖÁ÷ÐеÄshell
¡¡¡¡Ä¿Ç°Á÷ÐеÄshellÓÐash¡¢bash¡¢ksh¡¢csh¡¢zshµÈ£¬Äã¿ÉÒÔÓÃÏÂÃæµÄÃüÁîÀ´²é¿´Äã×Ô¼ºµÄshellÀàÐÍ£º
¡¡¡¡#echo $SHELL
¡¡¡¡$SHELLÊÇÒ»¸ö»·¾³±äÁ¿£¬Ëü¼Ç¼Óû§ËùʹÓõÄshellÀàÐÍ¡£Äã¿ÉÒÔÓÃÃüÁ
¡¡¡¡#shell-name
¡¡¡¡À´×ª»»µ½±ðµÄshell£¬ÕâÀïshell-nameÊÇÄãÏëÒª³¢ÊÔʹÓõÄshellµÄÃû³Æ£¬ÈçashµÈ¡£Õâ¸öÃüÁîΪÓû§ÓÖÆô¶¯ÁËÒ»¸öshell£¬Õâ¸öshellÔÚ×î³õµÇ¼µÄÄǸöshellÖ®ºó£¬³ÆΪϼ¶µÄshell»ò×Óshell¡£Ê¹ÓÃÃüÁ
¡¡¡¡$exit
¡¡¡¡¿ÉÒÔÍ˳öÕâ¸ö×Óshell¡£
¡¡¡¡Ê¹Óò»Í¬µÄshellµÄÔ­ÒòÔÚÓÚËüÃǸ÷×Ô¶¼ÓÐ×Ô¼ºµÄÌص㣬ÏÂÃæ×÷Ò»¸ö¼òµ¥µÄ½éÉÜ£º
¡¡¡¡1.ash¡¡¡¡ash shellÊÇÓÉKenneth Almquist±àдµÄ£¬LinuxÖÐÕ¼ÓÃϵͳ×ÊÔ´×îÉÙµÄÒ»¸öСshell£¬ËüÖ»°üº¬24¸öÄÚ²¿ÃüÁÒò¶øʹÓÃÆðÀ´ºÜ²»·½±ã¡£
¡¡¡¡2.bash¡¡¡¡bashÊÇLinuxϵͳĬÈÏʹÓõÄshell£¬ËüÓÉBrian FoxºÍChet Ramey¹²Í¬Íê³É£¬ÊÇBourne Again ShellµÄËõд£¬ÄÚ²¿ÃüÁîÒ»¹²ÓÐ40¸ö¡£LinuxʹÓÃËü×÷ΪĬÈϵÄsh


Ïà¹ØÎĵµ£º

linux svn³£ÓÃÃüÁî

1¡¢½«Îļþcheckoutµ½±¾µØĿ¼
svn checkout path£¨pathÊÇ·þÎñÆ÷ÉϵÄĿ¼£©
ÀýÈ磺svn checkout svn://192.168.1.1/pro/domain
¼òд£ºsvn co
2¡¢Íù°æ±¾¿âÖÐÌí¼ÓеÄÎļþ
svn add file
ÀýÈ磺svn add test.php(Ìí¼Ótest.php)
svn add *.php(Ìí¼Óµ±Ç°Ä¿Â¼ÏÂËùÓеÄphpÎļþ)
3¡¢½«¸Ä¶¯µÄÎļþÌá½»µ½°æ±¾¿â
svn commit - ......

linuxÐÞ¸Ässh¶Ë¿ÚºÍ½ûÖ¹rootÔ¶³ÌµÇ½ÉèÖÃ

linuxÐÞ¸Ässh¶Ë¿Ú22
vi /etc/ssh/ssh_config
vi /etc/ssh/sshd_config
È»ºóÐÞ¸ÄΪport 8888
ÒÔrootÉí·Ýservice sshd restart (redhat as3)
ʹÓÃputty,¶Ë¿Ú8888
LinuxÏÂSSHĬÈϵĶ˿ÚÊÇ22,ΪÁË°²È«¿¼ÂÇ£¬ÏÖÐÞ¸ÄSSHµÄ¶Ë¿ÚΪ1433,Ð޸ķ½·¨ÈçÏ £º
/usr/sbin/sshd -p 1433
ΪÔöÇ¿°²È«
ÏÈÔö¼ÓÒ»¸öÆÕͨȨÏÞµÄÓû§£º ......

linux ³£ÓÃcº¯Êý


opendir£¨´ò¿ªÄ¿Â¼£©
Ïà¹Øº¯Êý
open£¬readdir£¬closedir£¬rewinddir£¬seekdir£¬telldir£¬scandir
±íÍ·Îļþ
#include<sys/types.h>
#include<dirent.h>
¶¨Ò庯Êý
DIR * opendir(const char * name);
º¯Êý˵Ã÷
opendir()ÓÃÀ´´ò¿ª²ÎÊýnameÖ¸¶¨µÄĿ¼£¬²¢·µ»ØDIR*ÐÎ̬µÄĿ¼Á÷£¬ºÍopen()ÀàËÆ£¬½ÓÏ ......

ÔÚLinuxÉϵÄIDE ¿ª·¢»·¾³ Áбí


Integrated Development Environments / RAD tools / GUI-builders on Linux:
General/Editors:
Amy (HTML, C, C++, Java, SQL, LaTeX, Makefiles and many more languages)
blIDE (incomplete; no downloads as of yet)
IBM's Eclipse (an extensible IDE kit; Java, C/C++, plus other languages via plug-ins t ......

linuxÏÂechoÃüÁîÏê½â


linuxµÄechoÃüÁî, ÔÚshell±à³ÌÖм«Îª³£ÓÃ, ÔÚÖÕ¶ËÏ´òÓ¡±äÁ¿valueµÄʱºòÒ²Êdz£³£Óõ½µÄ, Òò´ËÓбØÒªÁ˽âÏÂechoµÄÓ÷¨
echoÃüÁîµÄ¹¦ÄÜÊÇÔÚÏÔʾÆ÷ÉÏÏÔʾһ¶ÎÎÄ×Ö£¬Ò»°ãÆðµ½Ò»¸öÌáʾµÄ×÷Óá£
¸ÃÃüÁîµÄÒ»°ã¸ñʽΪ£º echo [ -n ] ×Ö·û´®
ÆäÖÐÑ¡Ïîn±íʾÊä³öÎÄ×Öºó²»»»ÐУ»×Ö·û´®ÄܼÓÒýºÅ£¬Ò²Äܲ»¼ÓÒýºÅ¡£ÓÃechoÃüÁîÊä³ö¼ÓÒýº ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ