LinuxÏÂÍê³ÉµÄÒ»¸ö×÷Òµ³ÌÐò
Îĵµ´´½¨ÈÕÆÚ£º2010-02-18
01 // P173: 2.±à³ÌÌâ (5)ÊäÈëÒ»¸ö×Ö·û´®£¬Í³¼ÆÓ¢ÎÄ×Öĸ¡¢¿Õ¸ñ¡¢Êý×ÖºÍÆäËû×Ö·ûµÄ¸öÊý¡£
02
03 // The beginning of C program: test06-05.c.
04
05 // Header files included.
06 #include <stdio.h>
07 #include <string.h>
08
09 // Macro definition.
10 #define MAX_SIZE 100
11
12 // Main function's declaration.
13 int main ( void )
14 {
15 char ch[MAX_SIZE];
16 int letter=0, space=0, number=0, other=0, i=0, length=0;
17 printf ( "Please input a line of characters: " );
18 do
19 {
20 ch[i] = getchar();
21 i++;
22 } while ( ch[i-1] != '\n' );
23 length = i-1;
24 ch[length] = '\0';
25 printf ( "The string length is: %d\n", strlen(ch) );
26 &nbs
Ïà¹ØÎĵµ£º
/*
* linux/fs/bitmap.c
*
* (C) 1991 Linus Torvalds
*/
/* bitmap.c contains the code that handles the inode and block bitmaps */
#include <string.h>
#include <linux/sched.h>
#include <linux/kernel.h> // һЩÄں˳£Óú¯ÊýµÄÔÐζ¨Òå
......
/*
* linux/fs/inode.c
*
* (C) 1991 Linus Torvalds
*/
#include <string.h>
#include <sys/stat.h> // Îļþ״̬ͷÎļþ
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <asm/system.h>
......
LinuxÎļþ²éÕÒÃüÁîfind,xargsÏêÊö
Ò»¡¢find ÃüÁî¸ñʽ
1¡¢findÃüÁîµÄÒ»°ãÐÎʽΪ£»
find pathname -options [-print -exec -ok ...]
2¡¢findÃüÁîµÄ²ÎÊý£»
pathname: findÃüÁîËù²éÕÒµÄĿ¼·¾¶¡£ÀýÈçÓÃ.À´±íʾµ±Ç°Ä¿Â¼£¬ÓÃ/À´±íʾϵͳ¸ùĿ¼¡£
-print£º findÃüÁƥÅäµÄÎļþÊä³öµ½±ê×¼Êä³ö¡£
-exec£º findÃüÁî¶Ô ......
LinuxÊÇÒ»ÖÖÀàUnixµÄ²Ù×÷ϵͳ¡£´ÓÀíÂÛÉϽ²£¬Unix±¾ÉíµÄÉè¼Æ²¢Ã»ÓÐÊ²Ã´ÖØ´óµÄ°²È«È±ÏÝ¡£¶àÄêÀ´£¬¾ø´ó¶àÊýÔÚUnix²Ù×÷ϵͳÉÏ·¢ÏֵݲȫÎÊÌâÖ÷Òª´æÔÚÓÚ¸ö±ð³ÌÐòÖУ¬ËùÒԴ󲿷ÖUnix³§É̶¼Éù³ÆÓÐÄÜÁ¦½â¾öÕâЩÎÊÌ⣬Ìṩ°²È«µÄUnix²Ù×÷ϵͳ¡£µ«LinuxÓÐЩ²»Í¬£¬ÒòΪËü²»ÊôÓÚijһ¼Ò³§ÉÌ£¬Ã»Óг§ÉÌÐû³Æ¶ÔËüÌṩ°²È«±£Ö¤£ ......
linuxѧϰָÄÏÕë(ѧϰ·½·¨Ì¸Ö®¶þ)
Ö¸ÄÏÕë, linux, ѧϰ
һ.ΪʲôҪѧlinux?
µ±È»×îÖØÒªÊǰ®ºÃºÍÐËȤ£¡Èç¹ûÄãÕâÖÖ±ØÒªÑ§£¬»òÕ߸ù±¾²»Ï²»¶£¬Çë²»ÒªÀË·Ñʱ¼ä£¬ÄãѧҲѧ²»ºÃ£¡
¶þ.Æð²½
ÄãÓ¦¸ÃΪ×Ô¼º´´ÔìÒ»¸öѧϰlinuxµÄ»·¾³--ÔÚµçÄÔÉÏ×°Ò»¸ölinux»òunix
ÎÊÌâ1£º°æ±¾µÄÑ¡Ôñ
±±ÃÀÓÃredhat,Å·ÖÞÓÃSuSE,×ÀÃæmandrake ......