Linux ·ÃÎÊfat¸ñʽÎļþϵͳ
Ê×ÏÈÒªµ¼ÈëÕâЩͷÎļþ
#include
#include
#include
#include
#include
#include
È»ºó¿´Ò»ÏÂʵ¼ÊµÄ²Ù×÷
1¡¢²é¿´ÎļþϵͳÐÅÏ¢
asmlinkage long get_files_info(char * filesystem_type)//È¡µÃµ±Ç°Ä¿Â¼µÄÎļþϵͳÐÅÏ¢
{
struct fs_struct *fs ;
struct vfsmount *mnt ;
struct super_block *mnt_sb ;
struct file_system_type *s_type;
read_lock(¤t->fs->lock);
fs = current->fs;
mnt = fs->pwdmnt;
mnt_sb = mnt-> mnt_sb ;
s_type = mnt_sb -> s_type;
printk("PWD Filesystem Type is : %s\n",s_type->name);
copy_to_user(filesystem_type,s_type->name,strlen(s_type->name));
printk("PWD= %ld\n",mnt_sb->s_blocksize);
read_unlock(¤t->fs->lock);
return 0;
}
2¡¢²é¿´fat_boot_sector ÐÅÏ¢
asmlinkage long get_FAT_boot(char * filesystem_type)//È¡µÃfatÎļþϵͳµÄÐÅÏ¢
{
struct fs_struct *fs ;
struct vfsmount *mnt ;
struct super_block *mnt_sb ;
struct buffer_head * bh=NULL;
struct fat_boot_sector *fat_sector;
char c[512];
int len;
read_lock(¤t->fs->lock);
fs = current->fs;
mnt = fs->pwdmnt;
mnt_sb = mnt-> mnt_sb ;
char *fsname=mnt_sb -> s_type->name;
char *sfs="vfat";
if(strcmp(fsname,sfs)==0)//´ËʱÎļþϵͳÊÇvfat
{
sb_min_blocksize(mnt_sb, 512);
bh = sb_bread(mnt_sb, 0);
if(bh!=NULL)
{
fat_sector=(struct fat_boot_sector *)bh->b_data;
len=sprintf(c,"FATÎļþϵͳ¾ßÌå²ÎÊýÈçÏÂ:\n");
len=sprintf(c,"%sbackup boot sector= %d\n",c,fat_sector->backup_boot);
len=sprintf(c,"%ssectors/cluster= %d\n",c,fat_sector->sec_per_clus);
len=sprintf(c,"%snumber of heads= %d\n",c,fat_sector->heads);
len=sprintf(c,"%shidden sectors (unused)= %d\n",c,fat_sector->hidden);
len=sprintf(c,"%smedia code= %d\n",c,fat_sector->media);
len=sprintf(c,"%sbytes per logic
Ïà¹ØÎĵµ£º
×ÜÀÀ
ÓÃiptables -ADC À´Ö¸¶¨Á´µÄ¹æ
Ôò
£¬-AÌí¼Ó -Dɾ³ý -C ÐÞ¸Ä
iptables - [RI] chain rule num rule-specification[option]
ÓÃiptables - RI ͨ¹ý¹æÔòµÄ˳ÐòÖ¸¶¨
iptables -D chain rule num[option]
ɾ³ýÖ¸¶¨¹æÔò
iptables -[LFZ] [chain][option]
ÓÃiptables -LFZ Á´Ãû [Ñ¡Ïî]
iptables -[NX] chain
ÓÃ -NX ......
2009 Äê 4 ÔÂ 23 ÈÕ
±¾ÎÄÖÐÎÒÃÇÕë¶Ô Linux É϶àÏ̱߳à³ÌµÄÖ÷ÒªÌØÐÔ×ܽá³ö 5 Ìõ¾Ñ飬ÓÃÒÔ¸ÄÉÆ Linux ¶àÏ̱߳à³ÌµÄÏ°¹ßºÍ±ÜÃâÆäÖеĿª·¢ÏÝÚå¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃÇ´©²åһЩ Windows µÄ±à³ÌÓÃÀýÓÃÒÔ¶Ô±È Linux ÌØÐÔ£¬ÒÔ¼ÓÉî¶ÁÕßÓ¡Ïó¡£
±³¾°
Linux ƽ̨ÉϵĶàÏ̳߳ÌÐò¿ª·¢Ïà¶ÔÓ¦ÆäËûƽ̨£¨±ÈÈç Windows£©µÄ¶àÏß³Ì API ÓÐһЩϸ΢ ......
VmwareÉÏ×°µÄLinux£¬ÔÚShellÏÂÓÉÓÚÊä´íÃüÁî»òÊÇÖÖÖÖÔÒò£¬»á·¢³ö“à½à½”µÄ±¨¾¯Éù£¬²¢²»ÊÇÉù¿¨·¢³öµÄ£¬¶øÊÇÖ÷°åµÄ±¨¾¯£¬ËùÒÔ²»ÄÜͨ¹ý¹Ø±ÕÒôÏäÀ´½â¾ö¡£ÇÞÊÒÀï¾³£ÏìÆðÕâÑùµÄÉùÒô·Ç³£´Ì¶ú£¬½ñÌìÔÚÍøÉÏÕÒµ½Á˽â¾ö·½·¨£¬¼ÇÏ£º
½«/etc/inputrcÖеÄset bell-style none Ç°µÄ££È¥µô£¬Ö®ºóÖØÆôϵͳ¼´¿É¡£
²»¹ýÕâÖÖ·½ ......
linux fodera 13 Ï°²×° rpm gcc
ÏÈÔÚÖÕ¶ËϽøÈëFedora-13-Beta-i386-DVD ¹âÅÌÖÐµÄ Package Èí¼þ°ü
È»ºó°´ÈçÏÂ˳Ðò°²×°
rpm -ivh cpp-4.4.3-8.fc13.i686.rpm
rpm -ivh kernel-headers-2.6.33.1-24.fc13.i686.rpm
rpm -ivh glibc-headers-2.11.90-16.i686.rpm
rpm -ivh glibc-devel-2.11.90-16.i686.rpm
rpm -ivh ......
³ÉΪһÃû¾«Í¨ Linux ³ÌÐòÉè¼ÆµÄ¸ß¼¶³ÌÐòÔ±Ò»Ö±ÊDz»ÉÙÅóÓÑ×Î×ÎÒÔÇóµÄÄ¿±ê¡£¸ù¾ÝÖлªÓ¢²ÅÍøͳ¼ÆÊý¾Ý£¬±±¾©µØÇø Linux ³ÌÐòÔ±ÔÂнƽ¾ùΪ Windows ³ÌÐòÔ±µÄ 1.8 ±¶¡¢Java ³ÌÐòÔ±µÄ 2.6 ±¶£¬ Linux ³ÌÐòÔ±ÄêÖÕ½±½ðƽ¾ùΪ Windows ³ÌÐòÔ±µÄ 2.9 ±¶¡£Í¬Ê±Êý¾ÝÏÔʾ£¬Ëæ׏¤×÷¾ÑéµÄÔö³¤£¬ Linux ³ÌÐòÔ±Ó ......