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

LinuxÏÂÍê³ÉµÄÒ»¸ö×÷Òµ³ÌÐò

Îĵµ´´½¨ÈÕÆÚ£º2010-02-19
    01    // P174: 2.±à³ÌÌâ (13)²»ÀûÓÃstrcmpº¯Êý£¬×Ô¼º±à³ÌʵÏÖÁ½¸öÈÎÒâ×Ö·û´®µÄ±È½Ï¡£
    02   
    03    // The beginning of C program: test06-13.c.
    04   
    05    // Header files included.
    06    #include <stdio.h>
    07   
    08    // Macro definition.
    09    #define MAX_SIZE 100
    10   
    11    // No.1: Subroutine: int getstr ( char ch[], int size );
    12    int  getstr ( char ch[], int size )
    13    {
    14        int    i=0;
    15        if ( size >= MAX_SIZE )
    16        {
    17            printf ( "Input error, data will overflow!\n" );
    18            return  (0);
    19        }
    20        do
    21        {
    22            ch[i] = getchar();
    23            i++;
    24        } while ( ch[i-1] != '\n' );
    25        ch[i-1] = '\0';
    26        // ·µ»Ø0±íʾµ÷Óøú¯ÊýÀ´»ñÈ¡×Ö·û´®Ê±»ñÈ¡Ê


Ïà¹ØÎĵµ£º

JavaÅжÏOSÊÇlinux»¹ÊÇwindows

public class Test {
public static void main(String aa[]) {
if (System.getProperty("os.name").equals("Linux")) {
System.out.println("linux");
} else if (System.getProperty("os.name").equals("Windows XP")) {
System.out.println("win ......

LinuxÏ´´½¨Îļþ

ÊÔÒ»ÊÔ£¬ÆäʵºÜ¼òµ¥µÄ¡£
mkdir -m 775 filename
-m : ÉèÖÃÎļþµÄȨÏÞ¡£Ö±½ÓÉèÖ㬲»ÐèҪĬÈÏȨÏÞ¡£
[root@localhost home]# mkdir text1
[root@localhost home]# mkdir -m 777 text2
[root@localhost home]# ls -l
drwxr-xr-x 2 root root 4096 2010-1-19 08:03 text1
drwxrwxrwx 2 root root 4096 2010-1-19 08:04 ......

Linux°æ±¾Ò»ÀÀ



Linux
°æ±¾
Ò»ÀÀ
 
 
Linux
ÊÇÒ»Ì×Ãâ·ÑʹÓúÍ×ÔÓÉ´«²¥µÄÀà
Unix
²Ù×÷ϵͳ¡£ÎÒÃÇͨ³£Ëù˵µÄ
Linux
£¬Ö¸µÄÊÇ
GNU/Linux
£¬¼´²ÉÓÃ
Linux
Äں˵Ä
GNU
²Ù×÷ϵͳ¡£ÓÉÓÚ
Linux
ÊÇÒ»¸öÄںˣ¬ËüÖ»ÊDzÙ×÷ϵͳµÄºËÐÄ£¬¸ºÔð¿ØÖÆÓ²¼þ¡¢¹ÜÀíÎļþϵͳ¡¢³ÌÐò½ø³ÌµÈ¡£È»¶øÒ»¸öÍêÕûµÄ²Ù×÷ϵͳ²»½ö½öÊÇÄÚºË ......

[ת]°²×°linuxºóµÄÄں˵÷ÓÅ

kernel.shmall = 268435456
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_max_tw_buckets = 5000
net.ip ......

LinuxÏÂÍê³ÉµÄÒ»¸ö×÷Òµ³ÌÐò

Îĵµ´´½¨ÈÕÆÚ£º2010-02-19
   001    // P174: 2.±à³ÌÌâ (9)½«Êý×éaÖÐÏàÍ¬ÔªËØÖ»±£ÁôµÚÒ»¸ö£¬ÆäÓàɾ³ý¡£
   002   
   003    // The beginning of C program: test06-09.c.
   004   
   005  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ