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

ÎÒµÄÐéÄâÎļþϵͳ£¨linux)


 
1# ·¢±íÓÚ 2005-11-15 17:34  Ö»¿´¸Ã×÷Õß
  http://www.chinaunix.net ×÷Õß:bierdaci  ·¢±íÓÚ£º2004-05-25 18:59:33
²»ÖªµÀ¸Ã²»¸Ã·¢ÕâÀÊÇÎÒ´Óproc¸ÄÀ´µÄ,¶®ÄÚºËÔ´ÂëµÄ½»Á÷½»Á÷
hello.c
[code:1:3adb123188]
#include "hello.h"
struct inode * hello_get_inode(struct super_block *, int, struct hello_dir_entry *);
/*Õâ¸öº¯ÊýÊÇÖ±½Ó´Ólinux¸´ÖƹýÀ´µÄ£¬×÷ÓþÍÊÇÏÔʾĿ¼ÀïµÄÎļþÃû£¬Ã»ÓÐÕâ¸ö
º¯ÊýÒ²ÐÐÖ»ÊÇÄãÓÃls¡¢dirÃüÁî¿´²»µ½Ä¿Â¼ÏµÄÎļþ¡£*/
int hello_readdir(struct file * filp, void * dirent, filldir_t filldir)
{
printk("hello_readdir\n");
struct hello_dir_entry * de;
unsigned int ino;
int i;
struct inode *inode = filp->f_dentry->d_inode;
ino = inode->i_ino;
de = (struct hello_dir_entry *) inode->u.generic_ip;
if (!de)
return -EINVAL;
i = filp->f_pos;
switch (i) {
case 0:
if (filldir(dirent, ".", 1, i, ino, DT_DIR) < 0)
return 0;
i++;
filp->f_pos++;
/* fall through */
case 1:
if (filldir(dirent, "..", 2, i,
   filp->f_dentry->d_parent->d_inode->i_ino,
   DT_DIR) < 0)
return 0;
i++;
filp->f_pos++;
/* fall through */
default:
de = de->subdir;
i -= 2;
for (;;) {
if (!de)
return 1;
if (!i)
break;
de = de->next;
i--;
}
do {
if (filldir(dirent, de->name, de->namelen, filp->f_pos,
   de->low_ino, de->mode >> 12) < 0)
return 0;
filp->f_pos++;
de = de->next;
} while (de);
}
return 1;
}
int hello_d_revalidate(struct dentry *res, int i){printk("d_revalidate\n");return 0;}
int hello_d_hash(struct dentry *res, struct qstr *name){printk("d_hash\n");return 0;}
int hello_d_compare(struct dentry *res, struct qstr *name, struct qstr *old)
{printk("d_compare\n");return 0;}
int hello_d_delete(struct dentry *res){printk("d_delete\n");return


Ïà¹ØÎĵµ£º

LinuxÄÚºËÅäÖÃÎĵµ(make menuconfig)

Ò»¡¢ÒýÑÔ£º
    ±¾ÎĵµµÄÄÚÈݴ󲿷ÝÄÚÈݶ¼ÊÇ´ÓÍøÉÏÊÕ¼¯¶øÀ´£¬È»ºóÅäºÏһЩеĽØͼ£¨Äں˰汾£ºV2.4.19£©¡£ÔÚÿһÅäÖÃÏîºó»áÓÐÒ»¸öÑ¡ÔñÖ¸ÄϵIJ¿·Ý£¬ÓÃÀ´Ö¸µ¼´ó¼ÒÔõôÑù¸ù¾Ý×Ô¼ºµÄÇé¿öÀ´×öÏàÓ¦µÄÑ¡Ôñ£»»¹ÓÐÔÚÿһ¸ö´óÏîºÍÎĵµµÄ×îºó»áÓÐÒ»¸ö¾­Ñé̸£¬ËüÊÇһЩ¸ßÊÖÃÇÔÚÓ¦¶ÔÎÊÌâºÍ´¦ÀíÌØÓÐÓ²¼þʱµÄһЩ¾­Ñ飨Õâ¸ö»¹µ ......

Èý¿î Linux ϵÄÃâ·Ñ×ÀÃ漶ɱ¶¾Èí¼þ(ͼ)


ÓÉÓÚ Linux Á¼ºÃµÄÓû§È¨ÏÞ¹ÜÀíÌåϵ£¬²¡¶¾ÍùÍùÊÇ Linux ϵͳ¹ÜÀíÔ±×îºó²ÅÐèÒª¿¼ÂǵÄÎÊÌâ¡£ÒÔÍù£¬Linux ÉϵÄɱ¶¾Èí¼þÖ÷ÒªÊÇΪÆóÒµµÄÓʼþºÍÎļþ·þÎñÆ÷ËùÉè¼ÆµÄ¡£Èç½ñ£¬Ëæ×Å Linux ×ÀÃæÓû§ÊýÁ¿µÄÔö³¤£¬×ÀÃæÓû§ÔÚÊÜÒæÓÚ Linux ϵͳ¶Ô²¡¶¾½ÏÇ¿µÄÌìÈ»ÃâÒßÁ¦µÄͬʱ£¬Ò²ÐèҪɱ¶¾Èí¼þÇåÀí´ÓÍøÂç»òUÅÌ´øÀ´µÄWIndows²¡¶¾¡£¾¡¹ÜÄÇЩ ......

LinuxϵͳSudoÃüÁîµÄʹÓÃ˵Ã÷

“Sudo” ÊÇUnix/Linuxƽ̨ÉϵÄÒ»¸ö·Ç³£ÓÐÓõŤ¾ß£¬ËüÔÊÐíϵͳ¹ÜÀíÔ±·ÖÅä¸øÆÕͨÓû§Ò»Ð©ºÏÀíµÄ“ȨÀû”£¬ÈÃËûÃÇÖ´ÐÐһЩֻÓг¬¼¶Óû§»òÆäËûÌØÐíÓû§²ÅÄÜÍê³ÉµÄÈÎÎñ£¬±ÈÈ磺ÔËÐÐһЩÏñmount£¬halt£¬suÖ®ÀàµÄÃüÁ»òÕ߱༭һЩϵͳÅäÖÃÎļþ£¬Ïñ/etc/mtab£¬ /etc/samba/smb.confµÈ¡£ÕâÑùÒÔÀ´£ ......

linux ¹ÜÀíÃüÁî Ö® ¼àÊÓϵͳ

1.¼àÊÓÄÚ´æ
free -mt
             total       used       free     shared    buffers     cached
Mem:     ......

LinuxÏÂMail·þÎñÆ÷¼ÜÉè Sendmail

Ò»£® °²×°Sendmail¡£
   
ÍêÈ«°²×°Red Hat Linux
9.0ʱ£¬Sendmail¾Í»á×Ô¶¯ÄÚÖ㬰汾ºÅΪ8.12.8-4¡£Èç¹ûÄ㲻ȷ¶¨LinuxÊÇ·ñÒѾ­°²×°ÓÐsendmail£¬¿ÉÒÔÊäÈëÒÔÏÂÃüÁî²é¿´£º
    [root@ahpeng root] rpm –qa  grep sendmail
   
Èç¹ûÈ·¶¨Ã»Óа²×°£¬ÇëÔÚÍ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ