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

linux¹²ÏíÄÚ´æʹÓÃʵÀý

Èý¸öÎļþ£¬Ò»¸öÍ·Îļþ£¬Ò»¸ö¶Á£¬Ò»¸öд£¬ÓÃͬһ¸ökeyÖµÉêÇë¹²ÏíÄÚ´æ¡£
//shm.h
#ifndef _SHM_COM_H
#define _SHM_COM_H 1
#define TEXT_SZ 2048
struct shared_use_at
{
    int written_by_you;
    char some_text[TEXT_SZ];
};
struct kts
{
 int power;
 int mode;
 int temp;
 int windspeed;
 int write_flag;
};
#endif
//shm_write.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include "shm.h"
int main()
{
 int running = 1;
 void *shared_memory = (void *)0;
 struct shared_use_at *shared_stuff;
 char buffer[BUFSIZ];
 int shmid;
    shmid = shmget((key_t)1234, sizeof(struct shared_use_at), 0666 | IPC_CREAT);
    if(shmid == -1)
    {
 fprintf(stderr, "shmget failed\n");
 exit(EXIT_FAILURE);
    }
    shared_memory = shmat(shmid, (void *)0, 0);
    if(shared_memory == (void *)-1)
    {
        fprintf(stderr, "shmat failed\n");
        exit(EXIT_FAILURE);
    }
    printf("Memory attached at %X\n", (int)shared_memory);
    shared_stuff = (struct shared_use_at *)shared_memory;
    while(running)
    {
        while(shared_stuff->written_by_you == 1)
        {
            sleep(1);
            printf("waiting for client...\n");
        }
        printf("Enter some text: ");
      &n


Ïà¹ØÎĵµ£º

Linux iptableÎĵµ

×ÜÀÀ
ÓÃ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 ......

linuxÏÂi386,i486,i586,i686µÄÇø±ð


linuxÏÂi386,i486,i586,i686µÄÇø±ð
.
i386,i486,i586·Ö±ðÊÇÕë¶Ô80386,80486,80586±àÒëµÄ°ü£¬i686¾Í±È½Ï¹ã·ºÁË£¬´Óp2¿ªÊ¼x86´¦ÀíÆ÷¾Í½øÈëÁËp6¹¹¼ÜµÄʱ´ú£¬Ò»Ö±µ½ÏÖÔÚ¶¼ÊÇp6¼Ü¹¹¡£Ð¼ܹ¹µÄcpuÏòϼæÈÝΪ¾É¼Ü¹¹±àÒëµÄÈí¼þ°ü.
i386.rpmÓëi686.rpmÓÐʲôÇø±ð?
x86Ìåϵ½á¹¹ËäȻָÁһÑù£¬µ«ÊDz»Í¬Ê±´úµÄ¾ßÌåʵÏÖ£¬ÔÚ±àÒëÓ ......

Linux²é¿´°æ±¾

1.²é¿´Äں˰汾ÃüÁî
 1) cat /proc/version
 2) uname -a
 3) uname -r
2.²é¿´linuxµÄ°æ±¾
 1) lsb_release -a
 2) cat /etc/redhat-release
 3) cat /etc/issue
 4) rpm -q redhat-release (redhatϵͳ) ......

Ubuntu linuxϵͳÏ°²×°C kermit´®¿Ú¹¤¾ß

½â¾ö²½Ö裺
gylu@dell-desktop:~$ sudo apt-get install ckermit
ÏÔʾ°²×°¹ý³Ì
gylu@dell-desktop:~$gedit ~/.kermrc
ÊäÈëÏÂÃæÄÚÈݺ󱣴æ.kermrcÍ˳ö:
   set line            /dev/ttyS0
    set speed    & ......

DIY£º×Ô¼º¶¯ÊÖ×öÒ»¸öÃÔÄã Linux ϵͳ

http://www.ibm.com/developerworks/cn/linux/embed/diy/
DIY£º×Ô¼º¶¯ÊÖ×öÒ»¸öÃÔÄã Linux ϵͳ
ÎĵµÑ¡Ïî
<tr valign="top"><td width="8"><img alt="" height="1" width="8" src="//www.ibm.com/i/c.gif"/></td><td width=&quo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ