ºìÁªLinuxÃÅ»§
Linux°ïÖú

´Ó³ÌÐòÖÐÈÃLinux×Ô¶¯ÖØÆô

·¢²¼Ê±¼ä:2007-12-25 15:45:59À´Ô´:ºìÁª×÷Õß:weidrson
½¡×³µÄ³ÌÐòÐèÒª¿¼ÂǺܶàÒâÍâµÄÇé¿ö£¬¿ÉÊÇÎÞÂÛÄãÔõô¿¼ÂǶ¼²»»áÕÒÈ«ËùÓУ¬±ÈÈç·¢Êý¾Ý£¬¶Ô·½Ã»ÓÐÓ¦´ðÐèÒªÖØ·¢£¬Ò»´Î²»ÐÐÁ½´Î£¬¶à´Î²»ÐÐÔõô°ì£¿ºÜ¶àʱºò³ÌÐòÐèÒªÖØÆôÀ´ÖØнøÐС£

³ÌÐòÖØÆô£¬Ö»ÓгÌÐò×Ô¼ºÖØÆô£¬²»Ó°ÏìÆäËû¡£

ÒýÓÃ:
int main(int argc,char *argv[ ])

{

system(argv[0]);

}


ÁíÒ»¸ö¾ÍÊÇϵͳÖØÆô¡¢¸üС¢¹Ø±Õ£¬¾ÍÊdz£ÓõÄreboot,halt,shutdown¡£ÔÚ³ÌÐòÖÐÖØÆô¾ÍÊÇ

ÒýÓÃ:
system(¡°reboot¡±);

system(¡°shutdown¡±);

system(¡°halt¡±);
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 2 ÌõÆÀÂÛ

  1. ÌìÃ÷ ÓÚ 2007-12-25 16:08:17·¢±í:

    Óлú»áÊÔÊÔ

  2. bjseek ÓÚ 2007-12-25 16:07:56·¢±í:

    ·¹ý£¡