linuxÖеÄÓ²Á´½ÓºÍ·ûºÅÁ´½Ó
Ë÷Òý½Úµã¡¢Ó²Á¬½ÓºÍÁ¬½Ó¼ÆÊý
Ë÷Òý½Úµãinode£º
LinuxΪÿ¸öÎļþ·ÖÅäÒ»¸ö³ÆΪË÷Òý½ÚµãµÄºÅÂëinode£¬¿ÉÒÔ½«inode¼òµ¥Àí½â³ÉÒ»¸öÖ¸Õ룬ËüÓÀÔ¶Ö¸Ïò±¾ÎļþµÄ¾ßÌå´æ´¢Î»Öá£ÏµÍ³ÊÇͨ¹ýË÷Òý½Úµã(¶ø²»ÊÇÎļþÃû)À´¶¨Î»Ã¿Ò»¸öÎļþ¡£
ÀýÈ磺¼ÙÉèÎÒÃÇÔÚÓ²Å̵±Ç°Ä¿Â¼Ï½¨Á¢ÁËÒ»¸öÃûΪmytextÎı¾Îļþ£¬ÆäÄÚÈÝÖ»ÓÐÒ»ÐУº This is my file.
1¡¢µ±È»ÕâÐÐÎÄ×ÖÒ»¶¨ÊÇ´æ´¢ÔÚ´ÅÅÌÊý¾ÝÇøij¸ö¾ßÌåλÖÃÀï(ÎïÀíÉÏҪͨ¹ý´ÅÍ·ºÅ¡¢ÖùÃæºÅºÍÉÈÇøºÅÀ´ÃèÊö£¬ÔÚ±¾ÀýÖмÙÉè·Ö±ðÊÇ1¡¢20¡¢30)¡£
2¡¢¼ÙÉèÆäinodeÊÇ262457£¬ÄÇôϵͳͨ¹ýÒ»¶Î±ê×¼³ÌÐò£¬¾ÍÄܽ«Õâ¸öinodeת»»³É´æ·Å´ËÎļþµÄ¾ßÌåÎïÀíµØÖ·(1´ÅÍ·¡¢20ÖùÃæ¡¢30ÉÈÇø)£¬×îÖÕ¶Á³öÎļþµÄÄÚÈÝ£º“This is my file.”
3¡¢ËùÒÔinodeÊÇÖ¸ÏòÒ»¸öÎļþÊý¾ÝÇøµÄÖ¸ÕëºÅÂ룬һ¸öinode¶ÔÓ¦×ÅϵͳÖÐΨһµÄһƬÎïÀíÊý¾ÝÇø£¬¶øλÓÚÁ½¸ö²»Í¬ÎïÀíÊý¾ÝÇøµÄÎļþ±Ø¶¨·Ö±ð¶ÔÓ¦×ÅÁ½¸ö²»Í¬µÄinodeºÅÂë¡£
Îļþ¿½±´ÃüÁ
ÎÒÃǼüÈëÃüÁcp /home/zyd/mytext newfile ¡£ÔÚµ±Ç°¹¤×÷Ŀ¼½¨Á¢ÁËÒ»¸öÐÂÎļþnewfile£¬Æäʵ¼Ê²Ù×÷Ö÷Òª°üÀ¨ÈçÏÂÈý²½£º
1¡¢ÔÚµ±Ç°Ä¿Â¼ÖÐÔö¼ÓÒ»¸öĿ¼ÏÆäÎļþÃûÓòÌîÈënewfile£¬²¢·ÖÅäÁËÒ»¸öеÄinode£¬¼ÙÉèÊÇ262456¡£
2¡¢½«ÔÎļþ(ÔÚ1´ÅÍ·¡¢20ÖùÃæ¡¢30ÉÈÇø)µÄÄÚÈݸ´ÖÆÁËÒ»·Ýµ½ÐµĿÕÏÐÎïÀí¿é(¼ÙÉèÊÇ1´ÅÍ·¡¢20ÖùÃæ¡¢31ÉÈÇø)¡£
3¡¢ÌîдһЩÆäËû¹Ø¼üÐÅÏ¢£¬Ê¹ÏµÍ³Í¨¹ýÕâЩÐÅÏ¢¼°inodeºÅÂë¿ÉÒÔÍê³ÉÎïÀíµØÖ·µÄת»»¡£
ËùÒÔÎļþ¸´ÖÆÒª·ÖÅäеÄinodeºÍеÄÊý¾ÝÇø£¬ËäÈ»Á½¸öÎļþµÄÄÚÈÝÊÇÒ»ÑùµÄ¡£
Ó²Á¬½Óhardlink£º
ÎÒÃÇʵ¼ÊʹÓÃÎļþʱһ°ãÊÇͨ¹ýÎļþÃûÀ´ÒýÓõġ£Í¨¹ýÉÏÃæµÄÌÖÂÛ£¬ÎÒÃÇÖªµÀ£º
1¸öinodeºÅÂë¿Ï¶¨ºÍһƬÍêÈ«ÊôÓÚÒ»¸öÎļþµÄÊý¾ÝÇøÒ»Ò»¶ÔÓ¦¡£ÄÇôһ¸öÎļþϵͳÖÐÁ½¸ö»ò¸ü¶à¸ö²»Í¬µÄÎļþÃûÄÜ·ñ¶ÔӦͬһ¸öÎļþÄØ£¿´ð°¸Êǿ϶¨µÄ¡£
ÎÒÃÇÖªµÀinodeºÅÂëÊǼǼÔÚÎļþÃû¶ÔÓ¦µÄĿ¼ÏîÖеģ¬ÎÒÃÇ¿ÉÒÔʹÁ½¸ö»ò¶à¸öÎļþµÄĿ¼Ïî¾ßÓÐÏàͬµÄinodeÖµ£¬Êµ¼ÊÉϾÍʹËüÃǶÔÓ¦×Åͬһ¸öÎļþ¡£
Óм¸¸öĿ¼Ïî¾ßÓÐÏàͬµÄinodeºÅ£¬ÎÒÃǾÍ˵Õâ¸öÎļþÓм¸¸öÓ²Á¬½Ó(hardlink)£¬¶ÔÓÚÆÕͨÎļþ£¬ls -lÃüÁîµÄÁ¬½Ó¼ÆÊýcountÓòµÄÊýÖµ¾ÍÊDZ¾ÎļþÓµÓеÄÓ²Á¬½ÓÊý¡£Ó²Á¬½Ó¿ÉÒÔͨ¹ýlnÃüÁÁ¢£¬
ÀýÈ磺
ln /home/zyd/mytext hardlink_mytext
¾Í½¨Á¢ÁËÒ»¸öеÄÎļþhardlink_mytext£¬Õâ¸öÎļ
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
Anatomy of the Linux slab allocator
Learn how Linux manages memory
M. Tim Jones, Consultant Engineer, Emulex Corp.
M. Tim Jones is an embedded software architect and the author of GNU/Linux Application Programming, AI Application Programming, and BSD Sockets Programming from a Multilanguage Persp ......
Íø¿¨µÄÉèÖÃ
¼ûÒÔÇ°µÄÎÄÕÂ
Ö÷»úÃûµÄÉèÖÃ:
/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=a100 ----->Ö÷»úÃû
smbÊÇSamba µÄÖ÷ÒªÆô¶¯·þÎñÆ÷£¬ÈÃÆäËü»úÆ÷ÄÜÖªµÀ´Ë»úÆ÷¹²ÏíÁËʲô£»
......
linuxĿ¼¼Ü¹¹
/ ¸ùĿ¼
/bin ³£ÓõÄÃüÁî binary file µÄÄ¿錄
/boot ´æ·ÅϵͳÆô¶¯Ê±±ØÐë¶ÁÈ¡µÄµµ°¸£¬°üÀ¨ºËÐÄ (kernel) &nb ......
1. vmstat
Õâ¸ö¹¤¾ß¿ÉÒÔÈÃÄãÁ˽⵽ϵͳ×ÊÔ´µ±Ç°µÄ¸ºÔØÂÊ£¬°üÀ¨CPU£¬Äڴ棬swap¿Õ¼ä£¬ioµÈµÈ¡£
»ù±¾Ó÷¨
$ vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so&n ......