Linux¹Ø»úÃüÁî
1 shutdown:
[NAME
] shutdown - bring the system down
SYNOPSIS
/sbin/shutdown [-t sec] [-arkhncfF] time [warning-message]
DESCRIPTION
shutdown brings the system down in a secure way. All logged-in users are notified that the system is going down, and login(1) is blocked. It is possible to shut the system down immediately or after a specified delay. All processes are first notified that the system is going down by the signal SIGTERM. This gives programs like vi(1) the time to save the file being edited, mail and news processing programs a chance to exit cleanly, etc. shutdown does its job by signalling the init process, asking it to change the runlevel. Runlevel 0 is used to halt the system, runlevel 6 is used to reboot the system, and runlevel 1 is used to put to system into a state where administrative tasks can be performed; this is the
default if neither the -h or -r flag is given to shutdown. To see which actions are taken on halt or reboot see the
appropriate entries for these runlevels in the file /etc/inittab.
OPTIONS
-a Use /etc/shutdown.allow.
-t sec Tell init(8) to wait sec seconds between sending processes the warning and the kill signal, before changing to
another runlevel.
-k Do not really shutdown; only send the warning messages to everybody.
-r Reboot after shutdown.
&n
Ïà¹ØÎĵµ£º
Ò»¡¢ÒýÑÔ£º
±¾ÎĵµµÄÄÚÈݴ󲿷ÝÄÚÈݶ¼ÊÇ´ÓÍøÉÏÊÕ¼¯¶øÀ´£¬È»ºóÅäºÏһЩеĽØͼ£¨Äں˰汾£ºV2.4.19£©¡£ÔÚÿһÅäÖÃÏîºó»áÓÐÒ»¸öÑ¡ÔñÖ¸ÄϵIJ¿·Ý£¬ÓÃÀ´Ö¸µ¼´ó¼ÒÔõôÑù¸ù¾Ý×Ô¼ºµÄÇé¿öÀ´×öÏàÓ¦µÄÑ¡Ôñ£»»¹ÓÐÔÚÿһ¸ö´óÏîºÍÎĵµµÄ×îºó»áÓÐÒ»¸ö¾Ñé̸£¬ËüÊÇһЩ¸ßÊÖÃÇÔÚÓ¦¶ÔÎÊÌâºÍ´¦ÀíÌØÓÐÓ²¼þʱµÄһЩ¾Ñ飨Õâ¸ö»¹µ ......
×î½üÔÚѧϰlinux£¬ÔÚÕâÀï¸ø´ó¼ÒÍƼöÒ»¸öÍøÕ¾http://linux.vbird.org/ ÉÏÃæ¹ØÓÚlinuxµÄ½Ì³ÌдµÃºÜºÃ£¬Ò²±ÜÃâÁËÎÒÔÚѧϰ¹ý³ÌÖеĺܶàÍä·¡£
³ÌÐòÒ»£ºHelloWord,ÔÚÆÁÄ»Êä³öHelloWord
ÀûÓÃvim ´´½¨Ò»¸ösh01.shÎļþ
echo -e "Hello World!\a\n"
exit 0
³ÌÐò¶þ£º½«ÊäÈë²ÎÊýÆ´½ÓºóÊä³ö
read -p "First Name:" firstn ......
Linux ²é¿´´ÅÅÌ·ÖÇø¡¢Îļþϵͳ¡¢Ê¹ÓÃÇé¿öµÄÃüÁîºÍÏà¹Ø¹¤¾ß½éÉÜ
×÷Õߣº±±ÄÏÄϱ±
À´×Ô£ºLinuxSir.Org
ÌáÒª£ºLinux
´ÅÅÌ·ÖÇø±í¡¢ÎļþϵͳµÄ²é¿´¡¢Í³¼ÆµÄ¹¤¾ßºÜ¶à£¬ÓÐЩ¹¤¾ßÊǶ๦Äܵģ¬²»½ö½öÊDz鿴´ÅÅ̵ķÖÇø±í£¬¶øÇÒÒ²ÄܽøÐдÅÅÌ·ÖÇøµÄ²Ù×÷£»µ«ÔÚ±¾ÎÄ£¬ÎÒÃÇÖ»½²´ÅÅÌ·ÖÇø
µÄ²é¿´£¬ÒÔ¼°·ÖÇøµÄʹÓÃÇé¿öµÄ²é¿´£»±¾ÎÄÖ»ÊǸø ......
LinuxÏÂGetModuleFileNameµÄËÄÖÖд·¨
¡¡¡¡ÎÊÌâµÄÆðÒòÊÇÒª°ÑÒ»¸ö¶«¶«´ÓWindowsÒÆÖ²µ½»ùÓÚLinuxµÄǶÈëʽϵͳÉÏ¡£ÒÆÖ²¹ý³ÌÖУ¬Óöµ½ÁËGetModuleFileNameµÄÎÊ
Ì⡣ΪÁ˽â¾öÕâ¸öÎÊÌ⣬»¨Á˲»ÉÙµÄʱ¼ä£¬Ò²×ßÁ˲»ÉÙÍä·¡£ÏÂÃæÊÇÕûÀíµÄ½á¹û¡£
¡¡¡¡Ê×ÏÈժ¼һ¶ÎÎÄ×Ö£¬À´Ô´¡¶UNIX Programming FAQ ÖÐÎÄ°æ¡·
1.14. ÎÒÔõÑùÕÒ ......
¹²Ïí¿âµÄÃüÃû¹ßÀý
°´ÕÕ¹²Ïí¿âµÄÃüÃû¹ßÀý£¬Ã¿¸ö¹²Ïí¿âÓÐÈý¸öÎļþÃû£ºreal name¡¢sonameºÍlinker
name¡£ÕæÕýµÄ¿âÎļþ£¨¶ø²»ÊÇ·ûºÅÁ´½Ó£©µÄÃû×ÖÊÇreal
name£¬°üº¬ÍêÕûµÄ¹²Ïí¿â°æ±¾ºÅ¡£ÀýÈçÉÏÃæµÄlibcap.so.1.10¡¢libc-2.8.90.soµÈ¡£
sonameÊÇÒ»¸ö·ûºÅÁ´½ÓµÄÃû×Ö£¬Ö»°üº¬¹²Ïí¿âµÄÖ÷°æ±¾ºÅ£¬Ö÷°æ±¾ºÅÒ»Ö¼´¿É±£Ö¤¿âº¯ÊýµÄ½Ó¿ ......