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

linux±à³Ì»ù´¡—ÎļþI/O±à³Ì

    LinuxÎļþI/OÖ÷ÒªÓÉread¡¢write¡¢open¡¢close¡¢lseekÎå¸öº¯Êý×é³É£»
Ò»¡¢ÎļþÃèÊö·û
    ÔÚǶÈëʽLinuxÖÐÿ´ò¿ªÒ»¸öÎļþ¶¼ÓÐÒ»¸öÃèÊö·ûÓëÖ®¶ÔÓ¦£¬¸ÃÃèÊö·ûÊÇÒ»¸ö·Ç¸ºÕûÊý£»
    µ±ÓÃopen´ò¿ª»òн¨Ò»¸öÎļþʱ£¬¸Ãº¯ÊýµÄ·µ»ØÖµ¾ÍÊǸÃÎļþµÄÃèÊö·û£»
    µ±µ÷ÓÃread¡¢writeº¯ÊýÀ´¶ÁдÎļþʱ£¬½«ÎļþÃèÊö·û×÷Ϊ²ÎÊý´«½øÈ¥£»
¶þ¡¢º¯Êý½éÉÜ
1¡¢openº¯Êý
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
    º¯ÊýÐÎʽ£º
      int  open£¨const  char  pathname£¬  int  oflag£©
    ²ÎÊý£ºÒ»°ãʹÓÃÁ½¸ö²ÎÊý
             µ«´´½¨Îļþʱ£¬»áÓõ½µÚÈý¸ö²ÎÊý
    ·µ»ØÖµ£ºº¯Êýµ÷Óóɹ¦·µ»ØÎļþÃèÊö·û
                ʧ°Ü·µ»Ø  -1
    pathname—´ò¿ª»ò´´½¨ÎļþµÄÎļþÃû£»
    oflag——¿ØÖƱêÖ¾£¬Ê±¶à¸ö³£Êý½øÐлòÔËËãµÄ½á¹û£¬³£¼ûµÄ±êÖ¾ÓУº
                  O_RDONLY£º´ò¿ªÖ»¶Á
                  O_WRONLY£º´ò¿ªÖ»Ð´
                  O_RDWR£º´ò¿ª¶Á¡¢Ð´
                                                     ÒÔÉÏÈýÑ¡Ò»
                                     &


Ïà¹ØÎĵµ£º

linux¹Ø»úÃüÁîÏê½â

   ÔÚlinuxÏÂһЩ³£ÓõĹػú/ÖØÆôÃüÁîÓÐshutdown¡¢halt¡¢reboot¡¢¼°init£¬ËüÃǶ¼
¿ÉÒÔ´ïµ½ÖØÆôϵͳµÄÄ¿µÄ£¬µ«Ã¿¸öÃüÁîµÄÄÚ²¿¹¤×÷¹ý³ÌÊDz»Í¬µÄ£¬Í¨¹ý±¾ÎĵĽéÉÜ£¬Ï£
ÍûÄã¿ÉÒÔ¸ü¼ÓÁé»îµÄÔËÓø÷ÖֹػúÃüÁî¡£
1.shutdown
   shutdownÃüÁȫµØ½«ÏµÍ³¹Ø»ú¡£ ÓÐЩÓû§»áʹÓÃÖ±½Ó¶ÏµôµçÔ´µÄ·½Ê ......

linuxϵÄyumÃüÁîÏê½â

yumÊǸÉʲôµÄ(תÔØ http://www.soft6.com/tech/16/166057.html)
¡¡¡¡Ê¹ÓÃredhat£¬fedoraµÄlinuxer¿Ï¶¨¶¼ÎªrpmÖøÃûµÄdependency
hell¶øÍ·ÌÛ(ÕâÒ²ÊÇËùÓлùÓÚrpm·¢Ðа涼ÓеÄÎÊÌâ)¡£foo is needed by bar£¬bar is needed by
foo¡£Òª×°Ð¶¸öÈí¼þ£¬»¹µÃÐÁÐÁ¿à¿àµØÊáÀíÇå³þËùÓÐÒÀÀµÐÔÎÊÌ⣬rpmµÄ¼¸¸öËÑË÷Õ¾µã³ÉÁËʱ³£¹â¹ËµÄ³¡Ë ......

LinuxÏÂÃæµÄÈí¼þRAID6²âÊÔ

linuxϵÄÈí¼þRAIDÖ§³ÖRAID¼¶±ð0,1,4,5,6£¬½ñÌìÌرð²âÊÔÒ»ÏÂRAID6¡£
²½ÖèÒ»£º×¼±¸·ÖÇø
·ÖÇøÇé¿öÈçÏ£¬¾ßÌåÈçºÎ·ÖÇø¾Í²»½éÉÜÁË¡£
/dev/hdb5            5240        5252      1043 ......

Linux slab ·ÖÅäÆ÷ÆÊÎöÖ®Ò»£ºslab µÄ¸ÅÄî

      ÄÚ´æ¹ÜÀíµÄÄ¿±êÊÇÌṩһÖÖ·½·¨£¬ÎªÊµÏÖ¸÷ÖÖÄ¿µÄ¶øÔÚ¸÷¸öÓû§Ö®¼äʵÏÖÄÚ´æ¹²Ïí¡£ÄÚ´æ¹ÜÀí·½·¨Ó¦¸ÃʵÏÖÒÔÏÂÁ½¸ö¹¦ÄÜ£ºÒ»ÊÇ×îС»¯¹ÜÀíÄÚ´æËùÐèµÄʱ¼ä£»¶þÊÇ×î´ó»¯ÓÃÓÚÒ»°ãÓ¦ÓõĿÉÓÃÄڴ棨×îС»¯¹ÜÀí¿ªÏú£©¡£ÄÚ´æ¹ÜÀíʵ¼ÊÉÏÊÇÒ»ÖÖ¹ØÓÚȨºâµÄÁãºÍÓÎÏ·¡£Äú¿ÉÒÔ¿ª·¢Ò»ÖÖʹÓÃÉÙÁ¿ÄÚ´æ½øÐйÜÀíµÄËã· ......

PerlºÍPHPÔÚLinuxÏÂÎÞ·¨mkdir 777µÄÎÊÌâ

Ê×ÏÈPerl mkdir µÄÓï·¨ÊÇ£º
1.mkdir('dir', ´ú±í¾Åλ¶þ½øÖÆÊý×ÖµÄÊ®½øÖÆÖµ)
ÉèÖÃ775£¬Ôò¸ÃֵΪʮ½øÖƵÄ509£¬¼´¶þ½øÖƵÄ111111101
´ËÊýÖµ²»ÄÜÉèÖÃΪ111111111¼´Ê®½øÖƵÄ511¼´777¡£
2.mkdir('dir', 0³£¼ûunix3λȨÏÞ)
¿ÉÒÔÉèÖÃ777¡£
È»ºóÔÚlinuxÏÂʱ£¬ÓÉÓÚumaskµÄÔ­Òò£¬Ö»ÄÜÉèÖÃΪ755¡£
ÒòΪ´´½¨ÎļþʱµÄȨÏÞÊÇumaskºÍ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ