linux 0.11 Îļþϵͳ£¨Èý£©
Ŀ¼ÏîºÍ³¬¼¶¿é£¬½ÚµãµÄ¸ÅÄͬ£¬ËüÔÚÉ豸ÉÏûÓжÔÓ¦µÄ´ÅÅÌÊý¾Ý½á¹¹¡£Ïà·´£¬ËüÊÇĿ¼ÎÄ ¼þµÄÒ»²¿·Ö¡£linuxÖÐĿ¼ҲÊÇÒ»ÖÖÎļþ£¬ÀàÐÍÊÇ'd'¡£µ«ÊÇĿ¼ÖеÄÄÚÈÝºÍÆÕͨÎļþ²»Í¬£¬ËüÊÇÓÉĿ¼Ïî×é³ÉµÄ¡£×¢ÒâĿ¼Ïî²»ÊÇĿ¼¡£ÎÒÃǾ³£Ó÷¾¶Ãû Ö´ÐÐÏà¹Ø²Ù×÷£¬Ä¿Â¼Ïî¾ÍÊÇΪÁ˲éÕÒ·½±ãµÄ¡£
struct dirt_entry{
unsigned short inode;
char name[NAME_LEN];
}£»
¿É ÒÔ¿´µ½Ò»¸öĿ¼ÏîÖаüº¬ÁËÎļþµÄi½ÚµãºÅºÍÎļþµÄÃû³Æ¡£Â·¾¶ÓÐÁ½ÖÖ£¬Ò»ÖÖÊǾø¶Ô·¾¶£¬Ò»ÖÖÊÇÏà¶Ô·¾¶¡£±ÈÈç/home/fish¾ÍÊǾø¶Ô·¾¶£¬ËüÒÔ¸ùĿ¼ /Ϊ¿ªÍ·£¬¶ø X11/xorg.conf¾ÍÊÇÏà¶Ô·¾¶£¬ËüÏà¶ÔÓÚĿ¼/etc,Ò²¾ÍÊÇ˵ºóÕߵľø¶Ô·¾¶ÊÇ/etc/X11/xorg.conf¡£Â·¾¶ÊÇÓÉĿ¼Ïî×é³É µÄ¡£Äà /home/fish/fish.cÀ´Ëµ£¬µÚÒ»¸öĿ¼ÊÇ/£¬¼´¸ùĿ¼¡£ÔÚ¸ùĿ¼ÎļþÖÐÓÐÃû×ÖΪhomeµÄĿ¼ÏȻºóͨ¹ýhomeĿ¼ÏîÖеÄi½Úµã¾Í¿ÉÒÔ ÕÒµ½homeÎļþ£¬Í¨¹ýi½ÚµãÖеÄi_mode×ֶοÉÖªËüÊÇÒ»¸öĿ¼£¬ÔÚÕâ¸öÎļþÖÐÓÐÃûΪfishµÄĿ¼ÏȻºó¸ù¾ÝÕâ¸öĿ¼ÏîÖеÄi½ÚµãºÅÕÒµ½fish Îļþ¡£Í¬ÑùÓÉfishµÄinode->i_modeÖªÕâÒ²ÊǸöĿ¼¡£Í¬ÑùÔÚfishÎļþÖÐÕÒµ½ÃûΪfish.cµÄĿ¼Ï¾Í¿ÉÒÔÕÒ³öfish.cµÄ i½Úµã£¬ËÑË÷Íê³É¡£
namei.c ÊÇÄÚºËÖÐ×µÄÒ»¸öÎļþ£¬Ëü°üº¬ÁËÐí¶à¹ØÓÚĿ¼µÄ²Ù×÷£¬Èçfind_entry(´ÓÒ»¸öĿ¼ÖÐËÑË÷ÖÆ¶¨µÄĿ¼Ïî),add_entry(ÍùÖ¸¶¨µÄĿ¼ÖÐÌí ¼ÓÒ»¸öÎļþĿ¼Ïî),get_dir(¸ù¾Ý·¾¶ÃûÕÒµ½Ö¸¶¨µÄĿ¼),dir_namei(·µ»ØÖ¸¶¨Ä¿Â¼µÄi½ÚµãÖ¸Õë),»¹ÓÐnamei(¸ù¾Ý·¾¶ÃûÕÒµ½Ö¸ ¶¨Â·¾¶µÄi½Úµã)µÈµÈ¡£ÎÒÃǾÍÏÈÄÃfind_entryÀ´¿´Ò»Ï¡£
//dir:Ö¸¶¨Ä¿Â¼µÄi½ÚµãÖ¸Õë¡£name:ÎļþÃû,namelen£ºÎļþÃû³¤¶È¡£
//·µ»Ø£º¸ßËÙ»º³åÇøÖ¸ÕëºÍÏàÓ¦µÄĿ¼ÏîÖ¸Õë¡£
static struct buffer_head* find_entry(struct m_inode **dir,const char*name,int namelen,struct dir_entry **res_dir)
{
int entries;
int block ,i;
struct buffer_head *bh;
struct dir_entry *de;
struct super_blocl *sb;
//Èç¹û¶¨ÒåÁËNO_TRUNCATE,ÔòÈç¹ûÎļþÃû´óÓÚ×î´ó³¤¶ÈNAME_LEN,·µ»Ø¡£
Ïà¹ØÎĵµ£º
Technorati ±êÇ©: linux,at Ãû³Æ : at
ʹÓÃȨÏÞ : ËùÓÐʹÓÃÕß
ʹÓ÷½Ê½ : at -V [-q queue] [-f file] [-mldbv] TIME
˵Ã÷ : at ¿ÉÒÔÈÃʹÓÃÕßÖ¸¶¨ÔÚ TIME Õâ¸öÌØ¶¨Ê±¿ÌÖ´ÐÐij¸ö³Ìʽ»òÖ¸ÁTIME µÄ¸ñʽÊÇ HH:MMÆäÖÐµÄ HH ΪСʱ£¬MM Ϊ·ÖÖÓ£¬ÉõÖÁÄãÒ²¿ÉÒÔÖ¸¶¨ am, pm, midnight, noon, teatime(¾ÍÊÇÏÂÎç 4 µãïñ ......
ÓÉÓÚҪʹÓõ½log4cppµÄ¿â£¬¶ølog4cµÄ×ÊÁÏÊǷdz£µÄÉÙ£¬Ò²ÀÁµÃÈ¥Ñо¿ËüµÄÓ÷¨£¬ÓÚÊǾ;ö¶¨ÊÔÊÔ»ìºÏ±à³ÌÕßÍæÒâ¡£
Ê×ÏÈÏÈÒýÓÃÏÂC++ËüµÄfather: StroustrupµÄһƪÎÄÕ¡¶C++ Style and Technique FAQ¡·£¨http://www2.research.att.com/~bs/bs_faq2.html£©ÀïµÄһС¸öÆ ......
1¡¢Linux »ù´¡
°²×°Linux²Ù×÷ϵͳ LinuxÎļþϵͳ Linux³£ÓÃÃüÁî LinuxÆô¶¯¹ý³ÌÏê½â ÊìϤLinux·þÎñÄܹ»¶ÀÁ¢°²×°Linux²Ù×÷ϵͳ Äܹ»ÊìÁ·Ê¹ÓÃLinuxϵͳµÄ»ù±¾ÃüÁî ÈÏʶLinuxϵͳµÄ³£Ó÷þÎñ°²×°Linux²Ù×÷ϵͳ Linux»ù±¾ÃüÁîʵ¼ù ÉèÖÃLinux»·¾³±äÁ¿ ¶¨ÖÆLinuxµÄ·þÎñ Shell ±à³Ì»ù´¡Ê¹ÓÃvi±à¼Îļþ ʹÓÃEmacs±à¼Îļþ ʹÓÃÆäËû±à ......
fg¡¢bg¡¢jobs¡¢&¡¢ctrl + z¶¼ÊǸúϵͳÈÎÎñÓйصģ¬ËäÈ»ÏÖÔÚ»ù±¾Éϲ»ÔõôÐèÒªÓõ½ÕâЩÃüÁµ«Ñ§»áÁËÒ²ÊǺÜʵÓõÄ
Ò»¡£& ×î¾³£±»Óõ½
Õâ¸öÓÃÔÚÒ»¸öÃüÁîµÄ×îºó£¬¿ÉÒÔ°ÑÕâ¸öÃüÁî·Åµ½ºǫִ́ÐÐ
¶þ¡£ctrl + z
¿ÉÒÔ½«Ò»¸öÕýÔÚǰִ̨ÐеÄÃüÁî·Åµ½ºǫ́£¬²¢ÇÒÔÝÍ£
Èý¡£jobs
²é¿´µ±Ç°ÓжàÉÙÔÚºǫ́ÔËÐеÄÃüÁî
ËÄ¡£fg
......
ÓÉÓÚfind¾ßÓÐÇ¿´óµÄ¹¦ÄÜ£¬ËùÒÔËüµÄÑ¡ÏîÒ²ºÜ¶à£¬ÆäÖд󲿷ÖÑ¡Ïî¶¼ÖµµÃÎÒÃÇ»¨Ê±¼äÀ´Á˽âһϡ£¼´Ê¹ÏµÍ³Öк¬ÓÐÍøÂçÎļþϵͳ(
NFS)£¬findÃüÁîÔÚ¸ÃÎļþϵͳÖÐͬÑùÓÐЧ£¬Ö»Äã¾ßÓÐÏàÓ¦µÄȨÏÞ¡£ÔÚÔËÐÐÒ»¸ö·Ç³£ÏûºÄ×ÊÔ´µÄ ...
ÓÉÓÚfind¾ßÓÐÇ¿´óµÄ¹¦ÄÜ£¬ËùÒÔËüµÄÑ¡ÏîÒ²ºÜ¶à£¬ÆäÖд󲿷ÖÑ¡Ïî¶¼ÖµµÃÎÒÃÇ»¨Ê±¼äÀ´Á˽âһϡ£¼´Ê¹ÏµÍ³ ......