Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : linux

linux½ø³Ì¿ØÖÆ£­exit£¨£©

http://blog.chinaunix.net/u1/53053/showart_425191.html
#include<stdlib.h>
void exit(int status);
²»ÏñforkÄÇôÄÑÀí½â£¬´ÓexitµÄÃû×Ö¾ÍÄÜ¿´³ö£¬Õâ¸öϵͳµ÷ÓÃÊÇÓÃÀ´ÖÕÖ¹Ò»¸ö½ø³ÌµÄ¡£ÎÞÂÛÔÚ³ÌÐòÖеÄʲôλÖã¬Ö»ÒªÖ´Ðе½exitϵͳµ÷Ó㬽ø³Ì¾Í»áֹͣʣϵÄËùÓвÙ×÷£¬Çå³ý°üÀ¨PCBÔÚÄڵĸ÷ÖÖÊý¾Ý½á¹¹£¬²¢ÖÕÖ¹±¾½ø³ÌµÄÔËÐС£Çë¿´ÏÂÃæµÄ³ÌÐò£º
/* exit_test1.c */
#include<stdlib.h>
main()
{
printf("this process will exit!\n");
exit(0);
printf("never be displayed!\n");
}
±àÒëºóÔËÐУº
$gcc exit_test1.c -o exit_test1
$./exit_test1
this process will exit!
ÎÒÃÇ¿ÉÒÔ¿´µ½£¬³ÌÐò²¢Ã»ÓдòÓ¡ºóÃæµÄ"never be displayed!\n"£¬ÒòΪÔÚ´Ë֮ǰ£¬ÔÚÖ´Ðе½exit(0)ʱ£¬½ø³Ì¾ÍÒѾ­ÖÕÖ¹ÁË¡£
exit ϵͳµ÷ÓôøÓÐÒ»¸öÕûÊýÀàÐ͵IJÎÊýstatus£¬ÎÒÃÇ¿ÉÒÔÀûÓÃÕâ¸ö²ÎÊý´«µÝ½ø³Ì½áÊøʱµÄ״̬£¬±ÈÈç˵£¬¸Ã½ø³ÌÊÇÕý³£½áÊøµÄ£¬»¹ÊdzöÏÖijÖÖÒâÍâ¶ø½áÊøµÄ£¬Ò»°ãÀ´Ëµ£¬0±íʾûÓÐÒâÍâµÄÕý³£½áÊø£»ÆäËûµÄÊýÖµ±íʾ³öÏÖÁË´íÎ󣬽ø³Ì·ÇÕý³£½áÊø¡£ÎÒÃÇÔÚʵ¼Ê±à³Ìʱ£¬¿ÉÒÔÓÃwaitϵͳµ÷ÓýÓÊÕ×Ó½ø³ÌµÄ·µ»ØÖµ£¬´Ó¶øÕë¶Ô²»Í¬µÄÇé¿ö½øÐв»Í¬µÄ´¦Àí¡£¹ØÓÚwaitµÄÏêϸÇé¿ö£¬Î ......

linux½ø³Ì¿ØÖÆ£­wait£¨£©

http://blog.chinaunix.net/u1/53053/showart_425197.html
#include <sys/types.h> /* ÌṩÀàÐÍpid_tµÄ¶¨Òå */
#include <sys/wait.h>
pid_t wait(int *status)

½ø³ÌÒ»µ©µ÷ÓÃÁËwait£¬¾ÍÁ¢¼´×èÈû×Ô¼º£¬ÓÉwait×Ô¶¯·ÖÎöÊÇ·ñµ±Ç°½ø³ÌµÄij¸ö×Ó½ø³ÌÒѾ­Í˳ö£¬Èç¹ûÈÃËüÕÒµ½ÁËÕâÑùÒ»¸öÒѾ­±ä³É½©Ê¬µÄ×Ó½ø³Ì£¬wait¾Í»áÊÕ¼¯Õâ¸ö×Ó½ø³ÌµÄÐÅÏ¢£¬²¢°ÑËü³¹µ×Ïú»Ùºó·µ»Ø£»Èç¹ûûÓÐÕÒµ½ÕâÑùÒ»¸ö×Ó½ø³Ì£¬wait¾Í»áÒ»Ö±×èÈûÔÚÕâÀֱµ½ÓÐÒ»¸ö³öÏÖΪֹ¡£
²ÎÊýstatusÓÃÀ´±£´æ±»ÊÕ¼¯½ø³ÌÍ˳öʱµÄһЩ״̬£¬ËüÊÇÒ»¸öÖ¸ÏòintÀàÐ͵ÄÖ¸Õë¡£µ«Èç¹ûÎÒÃǶÔÕâ¸ö×Ó½ø³ÌÊÇÈçºÎËÀµôµÄºÁ²»ÔÚÒ⣬ֻÏë°ÑÕâ¸ö½©Ê¬½ø³ÌÏûÃðµô£¬£¨ÊÂʵÉϾø´ó¶àÊýÇé¿öÏ£¬ÎÒÃǶ¼»áÕâÑùÏ룩£¬ÎÒÃǾͿÉÒÔÉ趨Õâ¸ö²ÎÊýΪNULL£¬¾ÍÏóÏÂÃæÕâÑù£º
pid = wait(NULL);

Èç¹û³É¹¦£¬wait»á·µ»Ø±»ÊÕ¼¯µÄ×Ó½ø³ÌµÄ½ø³ÌID£¬Èç¹ûµ÷Óýø³ÌûÓÐ×Ó½ø³Ì£¬µ÷Óþͻáʧ°Ü£¬´Ëʱwait·µ»Ø-1£¬Í¬Ê±errno±»ÖÃΪECHILD¡£
ÏÂÃæ¾ÍÈÃÎÒÃÇÓÃÒ»¸öÀý×ÓÀ´ÊµÕ½Ó¦ÓÃÒ»ÏÂwaitµ÷Óãº
/* wait1.c */
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdlib.h>
main()
{
pid_t pc, ......

linux ѧϰ1 2009

   Ò» ÓÅÅ̹ÒÔØ
           1£º fdisk -l  ÁгöÖ¸¶¨É豸µÄ·ÖÇø±íÐÅÏ¢¡£ÓÉÓÚusbÅÌÊDZ»Ä£ÄâΪscsiÉ豸·ÃÎÊ£¬ËùÒԻᱻ×Ô¶¯ÃüÃûΪsd*¡£
                      ÕÒµ½¹ÒÔصÄÓÅÅÌ
           2£º ×îºó¾ÍÊÇ°ÑUÅÌmountÉÏÈ¥£¬ÕâÀïÐèÒªÏÈÔÚmntĿ¼ÏÂÃ潨һ¸öusbĿ¼
                      mount /dev/sda  /mnt/usb
           3£º  ÓÅÅÌжÔØ
                  жÔØUÅÌ£ºumount /mnt/usb
¡¡¶þ  ¹ÒÔعâÅÌ
¡¡¡¡  ¹ÒÔعâÅ̵ÄÃüÁî ÈçÏ£º
¡¡¡¡  # mount -t is09660 /dev/cdrom /mnt/cdrom
¡¡¡¡   ¸ÃÃüÁ¹âÅ̹ÒÔص½/mnt/cdromĿ¼£¬Ê¹ÓÓls /mnt ......

ÔÚÐéÄâ»úÖеÄlinuxÏ°²×°tomcatºÍ²¿ÊðÏîÄ¿

×î½üѧϰÁËÔÚlinuxϲ¿ÊðÏîÄ¿£¬Ð´Ð´Ðĵá£
1.°²×°ÐéÄâ»úºó£¬ÅäºÃÍøÂ磬ÇŽÓ×îÈÝÒ×Å䣬ֱ½ÓÔÚlinuxÏÂʹÓÃͬһ¸öÍø¶ÎµÄÈÎÒâipµØÖ·¼´¿É¡£Ë³±ã°ÑvmµÄ¼¸¸öÍøÂçµÄ·þÎñ¸øÍ£ÁË¡£
2.ºÜÖØÒªµÄÒ»µã£¬°ÑlinuxµÄ°²È«ÅäÖÃÉèÖúᣲ¢¿ªÆôsshd·þÎñ
3.ÏÂÔØwindowsÖÐÐèÒªÁ½¸ö¹¤¾ß£ºputtyfile_0.60cn.zip winscp403setupintl.exe
Ç°ÕßΪԶ³ÌµÇ¼¹¤¾ß£¨sshµÇ¼£©£¬ºóÕßΪÎļþ´«Ê乤¾ß¡£°²×°ºóÅäºÃÍøÂçµØÖ·
4.°ÑÏÂÔغõÄjdkj´«ÉÏÈ¥
5.°²×°ºÃÔÙÅäÖû·¾³±äÁ¿
6.ÑéÖ¤ÅäÖóɹ¦ºó£¬´«tomcat£¬ÔÙÅäÏÂtomcat
7.ÉÏ´«´ò°üºÃµÄÏîÄ¿Îļþ
8.¿ªÆôtomcat£¬ok³É¹¦ÁË£¡
ÔÚlinux¹Ø±ÕͼÐλ¯½çÃ棬ÔÚÎı¾±à¼­Ä£Ê½ÏÂÊäÈ룺init 3
init 6ÖØÆô£¬init 5 ÖØдò¿ªÍ¼ÐνçÃ棬init 0¹Ø»ú
netconfigÅäÖÃÍø¿¨ÊôÐÔ
ÅäÖÃÍêÍøÂç²ÎÊýºó£¬ÔÙÊäÈëÃüÁservice network restartÍøÂç·þÎñÖØÆô
ifconfig eth0²é¿´Íø¿¨ÅäÖÃ
¶Ôlinux½øÐÐÔ¶³Ì¹ÜÀí
service sshd start
ÈÃÆäÿ´Î¿ª»ú¶¼×Ô¶¯Æô¶¯
chkconfig sshd on
²é¿´sshd·þÎñ
netstat -anp | grep :22
°²×°jdk£º
°ÑÏÂÔصÄjdk1.6.binµÄÖ´ÐÐȨÏ޸ıäΪ¿ÉÖ´ÐÐ
ÃüÁîÐУºchmod u+x ÎļþÃû
È»ºóÖ´ÐÐÎļþ¼´¿É
Óõ½ÁíһЩ²ÎÊý£º
ln -sf Ŀ¼»òÎļþÃû ¿ì½Ý·½Ê½Ä¿Â¼»òÎļþÃû ......

Linux »·¾³±äÁ¿×ܽá

1¡¢ÒýÑÔ
   
ÔÚ
linuxϵͳ
Ï£¬Èç¹ûÄãÏÂÔز¢°²×°ÁËÓ¦ÓóÌÐò£¬ºÜÓпÉÄÜÔÚ¼üÈëËüµÄÃû³Æʱ³öÏÖ“
command not found
”µÄÌáʾÄÚÈÝ¡£Èç¹ûÿ´Î¶¼µ½°²×°Ä¿±êÎļþ¼ÐÄÚ£¬ÕÒµ½¿ÉÖ´ÐÐÎļþÀ´½øÐвÙ×÷¾ÍÌ«·±ËöÁË¡£ÕâÉæ¼°µ½»·¾³±äÁ¿
PATH
µÄÉèÖÃÎÊÌ⣬¶ø
PATH
µÄÉèÖÃÒ²ÊÇÔÚ
linux
϶¨ÖÆ»·¾³±äÁ¿µÄÒ»¸ö×é³É²¿·Ö¡£±¾ÎÄ»ùÓÚ
RedHat 9.0
£¬Ïêϸ½²½âÁË»·¾³±äÁ¿¶¨ÖƵÄÎÊÌâ¡£
2
¡¢±äÁ¿¼ò½é
Linux
ÊÇÒ»¸ö¶àÓû§µÄ²Ù×÷ϵͳ¡£Ã¿¸öÓû§µÇ¼ϵͳºó£¬¶¼»áÓÐÒ»¸öרÓõÄÔËÐл·¾³¡£Í¨³£Ã¿¸öÓû§Ä¬ÈϵĻ·¾³¶¼ÊÇÏàͬµÄ£¬Õâ¸öĬÈÏ»·¾³Êµ¼ÊÉϾÍÊÇÒ»×é»·¾³±äÁ¿µÄ¶¨Òå¡£Óû§¿ÉÒÔ¶Ô×Ô¼ºµÄÔËÐл·¾³½øÐж¨ÖÆ£¬Æä·½·¨¾ÍÊÇÐÞ¸ÄÏàÓ¦µÄϵͳ»·¾³±äÁ¿¡£
3
¡¢¶¨ÖÆ»·¾³±äÁ¿
   
»·¾³±äÁ¿ÊǺÍ
Shell
½ôÃÜÏà¹ØµÄ£¬Óû§µÇ¼ϵͳºó¾ÍÆô¶¯ÁËÒ»¸ö
Shell
¡£¶ÔÓÚ
Linux
À´ËµÒ»°ãÊÇ
bash
£¬µ«Ò²¿ÉÒÔÖØÐÂÉ趨»òÇл»µ½ÆäËüµÄ
Shell
¡£¸ù¾Ý·¢Ðа汾µÄÇé¿ö£¬
bash
ÓÐÁ½¸ö»ù±¾µÄϵͳ¼¶ÅäÖÃÎļþ£º
/etc/bashrc
ºÍ
/etc/profile
¡£ÕâЩÅäÖÃÎļþ°üº¬Á½×鲻ͬµÄ±äÁ¿£º
shell
±äÁ¿ºÍ»·¾³±äÁ¿¡£Ç°ÕßÖ»ÊÇÔÚÌض¨µÄ
shell
Öй̶¨£¨Èç
bash
£©£¬ºóÕßÔÚ²»Í¬
......

AdeosÔÚLinuxÖеÄʵÏÖ·ÖÎö

Ô­ÎÄ£ºhttp://linux.chinaunix.net/bbs/thread-793613-1-1.html
±¾ÎÄÀ´×ÔÓÚÔ­ÎÄÄÚÈÝ£¬µ«ÊǶÔÎÄÕµÄÄÚÈÝÓë½á¹¹×öÁ˼òµ¥µ÷Õû¡£
1  ½éÉÜ
¿¼Âǵ½´ÓÓ²¼þ²ã¿ªÊ¼¹¹½¨Ò»¸ö²Ù×÷ϵͳµÄÄѶȣ¬Adeos²¢Ã»Óв¢Ã»ÓдÓÁ㿪ʼ¹¹½¨Ò»¸öÓ²¼þ³éÏó²ã£»Ä¿Ç°£¬AdeosÊÇ»ùÓÚLinuxÄÚºËʵÏֵģ¬ÕâÑùµÄ»°£¬¾Í¿ÉÒÔ½«ÏµÍ³µÄÆô¶¯ºÍ³õʼ»¯¹¤×÷¶¼ÓÉLinuxÀ´Íê³É£¬ÔÚϵͳÍê³É³õʼ»¯ºó£¬ÔÙ½øÐÐAdeosµÄ³õʼ»¯¹¤×÷£¨°üÀ¨½Ó¹ÜLinuxµÄÖжϹÜÀí»úÖÆ£©£¬Adeos¹¦ÄܼȿÉÒÔÖ±½Ó±àÒë½øÄںˣ¬Ò²¿ÉÒÔ×÷Ϊһ¸öÄÚºËÄ£¿éÔÚϵͳÔËÐÐʱ¶¯Ì¬¼ÓÔØ£¬¾ÍºÍÄں˵ÄÇý¶¯³ÌÐòÄ£¿éÒ»Ñù¡£
ÔÚÕâÖÖʵÏÖ·½·¨Ï£¬Linux×÷ΪAdeosµÄÒ»¸öÌØÊâµÄÓò´æÔÚ£¬ÎÒÃdzÆ֮Ϊ¸ùÓò£¨Root Domain£©¡£AdeosµÄºÜ¶à¹¦Äܶ¼ÊÇÒÀ¿¿¸ùÓò£¨Ò²¾ÍÊÇLinuxÄںˣ©À´ÊµÏֵģ¬ÀýÈ磬¶¯Ì¬×¢²áÆäËüµÄÓòÄ£¿éÊÇͨ¹ýLinuxµÄ¶¯Ì¬Ä£¿é¼ÓÔع¦ÄÜʵÏֵģ¬ÎªÆäËüÓòµÄÈÎÎñ·ÖÅäÈÎÎñ¶ÑÕ»ÊÇͨ¹ýLinuxÄÚ´æ·ÖÅä½Ó¿ÚʵÏֵĵȡ£¸ùÓòµÄ³õʼ»¯ÊÇÔÚAdeosµÄ³õʼ»¯¹ý³ÌÖÐÍê³ÉµÄ£»¸ùÓò¶ÔÓÚAdeosÀ´Ëµ£¬ÓÐÒ»µãÀàËÆÓÚLinux³õʼ»¯¹ý³ÌÖд´½¨µÄINIT½ø³Ì£»
2  »ù±¾¼Ü¹¹
AdeosÔÚLinuxÅäÖÃÖÐÔö¼ÓÁËÈý¸öÅäÖÿª¹ØÀ´ÅäÖÃAdeosµÄ´úÂ룺CONFIG_ADEOS_CORE£¬CONFIG_ADEOSºÍCONFIG_ADEOS_MODULE¡£Èç¹û¶¨ÒåÁËC ......
×ܼǼÊý:5772; ×ÜÒ³Êý:962; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [948] [949] [950] [951] 952 [953] [954] [955] [956] [957]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ