ÎÒµÄÐéÄâÎļþϵͳ£¨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
Ïà¹ØÎĵµ£º
tar
-c: ½¨Á¢Ñ¹Ëõµµ°¸
-x£º½âѹ
-t£º²é¿´ÄÚÈÝ
-r£ºÏòѹËõ¹éµµÎļþĩβ׷¼ÓÎļþ
-u£º¸üÐÂÔѹËõ°üÖеÄÎļþ
ÕâÎå¸öÊǶÀÁ¢µÄÃüÁѹËõ½âѹ¶¼ÒªÓõ½ÆäÖÐÒ»¸ö£¬¿ÉÒԺͱðµÄÃüÁîÁ¬Óõ«Ö»ÄÜÓÃÆäÖÐÒ»¸ö¡£ÏÂÃæµÄ²ÎÊýÊǸù¾ÝÐèÒªÔÚѹËõ»ò½âѹµµ°¸Ê±¿ÉÑ¡µÄ¡£
-z£ºÓÐgzipÊôÐÔµÄ
-j£ºÓÐbz2ÊôÐÔµÄ
-Z£ºÓÐcompressÊôÐ﵀ ......
Ò»£® °²×°Sendmail¡£
ÍêÈ«°²×°Red Hat Linux
9.0ʱ£¬Sendmail¾Í»á×Ô¶¯ÄÚÖ㬰汾ºÅΪ8.12.8-4¡£Èç¹ûÄ㲻ȷ¶¨LinuxÊÇ·ñÒѾ°²×°ÓÐsendmail£¬¿ÉÒÔÊäÈëÒÔÏÂÃüÁî²é¿´£º
[root@ahpeng root] rpm –qa grep sendmail
Èç¹ûÈ·¶¨Ã»Óа²×°£¬ÇëÔÚÍ ......
ÎÒÓõÄÊÇ fedora 12 ×Ô´ýµÄjdk 1.6 ÔÚ /usr/lib/jvm/java-1.6.0-openjdk
µÚÒ»²½£º°Ñapache-tomcat-6.0.26.tar.gz½âѹºó·Åµ½/usr/local/ÏÂÖØÃüÃûΪapache-tomcat-6.0.26
µÚ¶þ²½£ºÔÚ/etc/profileÎļþÖÐÊʵ±µÄλÖÃÌí¼ÓÈçÏ»·¾³±äÁ¿
CATALINA_HOME=/usr/local/apache-tomcat-6.0.26
CATALINA_BASE=/usr/local/apache-tomcat ......
LinuxÌṩÁË´óÁ¿µÄÃüÁÀûÓÃËü¿ÉÒÔÓÐЧµØÍê³É´óÁ¿µÄ¹¤×÷£¬Èç´ÅÅ̲Ù×÷¡¢Îļþ´æÈ¡¡¢Ä¿Â¼²Ù×÷¡¢½ø³Ì¹ÜÀí¡¢ÎļþȨÏÞÉ趨µÈ¡£ËùÒÔ£¬ÔÚLinuxϵͳÉϹ¤×÷Àë²»¿ªÊ¹ÓÃϵͳÌṩµÄÃüÁî¡£ÒªÏëÕæÕýÀí½âLinuxϵͳ£¬¾Í±ØÐë´ÓLinuxÃüÁîѧÆð£¬Í¨¹ý»ù´¡µÄÃüÁîѧϰ¿ÉÒÔ½øÒ»²½Àí½âLinuxϵͳ¡£
²»Í¬Linux·¢ÐаæµÄÃüÁîÊýÁ¿²»Ò»Ñù£¬µ«Linux·¢ÐÐ°æ± ......