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

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

Îĵµ´´½¨ÈÕÆÚ£º2010-02-19
   001    // P174: 2.±à³ÌÌâ (9)½«Êý×éaÖÐÏàÍ¬ÔªËØÖ»±£ÁôµÚÒ»¸ö£¬ÆäÓàɾ³ý¡£
   002   
   003    // The beginning of C program: test06-09.c.
   004   
   005    // Header files included.
   006    #include <stdio.h>
   007    #include "head06-09.h"
   008   
   009    // Macro definition.
   010    #define MAX_SIZE 100
   011   
   012    // Main function's declaration.
   013    int  main ( void )
   014    {
   015        int     i=0,  n=10;
   016        float   list[MAX_SIZE];
   017        printf ( "Please input 10 float numbers for the list: " );
   018        for ( i=0; i<n; i++ )
   019            scanf  ( "%f", &list[i] );
   020        for ( i=0; i<n; i++ )
   021            list[i] = rounding (list[i]);
   022        select_sort (list, n);
   023        if ( delete_RptElmt (list, &n) == 0 )
   024            return  (1);
   025        printf ( "The new list is:\n" );
   026        for ( i=0; i<n; i++ )
   027&n


Ïà¹ØÎĵµ£º

Ìá¸ßLinux²Ù×÷ϵͳ°²È«ÐÔµÄÊ®´óÕÐÊý

   LinuxÊÇÒ»ÖÖÀàUnixµÄ²Ù×÷ϵͳ¡£´ÓÀíÂÛÉϽ²£¬Unix±¾ÉíµÄÉè¼Æ²¢Ã»ÓÐÊ²Ã´ÖØ´óµÄ°²È«È±ÏÝ¡£¶àÄêÀ´£¬¾ø´ó¶àÊýÔÚUnix²Ù×÷ϵͳÉÏ·¢ÏֵݲȫÎÊÌâÖ÷Òª´æÔÚÓÚ¸ö±ð³ÌÐòÖУ¬ËùÒԴ󲿷ÖUnix³§É̶¼Éù³ÆÓÐÄÜÁ¦½â¾öÕâЩÎÊÌ⣬Ìṩ°²È«µÄUnix²Ù×÷ϵͳ¡£µ«LinuxÓÐЩ²»Í¬£¬ÒòΪËü²»ÊôÓÚijһ¼Ò³§ÉÌ£¬Ã»Óг§ÉÌÐû³Æ¶ÔËüÌṩ°²È«±£Ö¤£ ......

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ϳ£ÓÃÍøÂçÎļþ

1). /etc/sysconfig/network
Ö÷ÒªÓÃÓÚÉèÖÃÖ÷»úÃû³Æ£¨Host Name£©ÒÔ¼°ÄÜ·ñÆô¶¯Network¡£±ä¶¯´ËÎļþºóÐèÖØÆôLinux²ÅÄÜÉúЧ¡£
2). /etc/sysconfig/network-scrips/ifcfg-eth0
ÉèÖÃÍø¿¨²ÎÊý£¬ÈçGATEWAY,TYPE,DEVICE,NETMASK,IPADDR,USERCTLµÈ...
3). /etc/resolv.conf
Èç¹ûÒªÉèÖÃDNS¹¦ÄܽøÐÐÖ÷»úÃû³ÆºÍIPµÄ¶ÔÓ¦¡£ÄÇôresol ......

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Ϲػú×îÒªÓÐÒÔÏ·½·¨£¬ÎÒÏëÕâЩ·½·¨×ãÒÔÂú×ãÄãµÄÐèÒª£º
[root@localhost /]# shutdown [-tÃë] [-arkhcncfF] [ʱ¼ä] [ÌáʾÐÅÏ¢]
[root@localhost /]# shutdown -h 10 'I will shutdown after 10 mins'
-t sec : -t ºó¼ÓÃëÊý£¬¼´‘¹ý¼¸ÃëÖÓºó¹Ø»ú’µÄÒâ˼¡£
-k : ²»ÒªÕæµÄ¹Ø»ú£¬Ö»ÊÇ·¢ËÍÌáʾÐÅÏ¢¡£
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ