LINUX ÄÚ´æÓ³Éä
ÔÚ³£¹æIOÖУ¬ÎÒÃÇÒ»°ã¶¼ÊÇÈÏΪºÍÎļþϵͳ×öIO²Ù×÷×ÜÊÇÎÞ·¨±ÜÃâµÄ±ØÐë²»ÑáÆä·³µÄwrite£¬read£¬¶øÊÂʵÉÏÕâÖÖ·½Ê½ÔÚ½øÐÐһЩ´óÎļþ²Ù×÷µÄʱºò£¬ÏÔµÃÊ®·ÖµÄ²»±ã£¬ÏÂÃæÕâ¶Î´úÂ뼴չʾÁËÈç¹û½«ÎïÀíÓ²ÅÌÉϵÄÊý¾ÝÓ³Éäµ½ÄÚ´æÖУ¬ÎÒÃÇÏñ²Ù×÷ÆÕͨµÄÄÚ´æÒ»Ñù¶ÔÎļþ½øÐжÁд£º
#include <sys/mman.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <iostream>
#include <string.h>
using namespace std;
main(int argc, char** argv) // map a normal file as shared mem:
{
int fd,i;
char *p_map;
char cs[]="helloworld";
fd=open( argv[1],O_CREAT|O_RDWR,00777 );
p_map = (char*)mmap(NULL,10,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0);
for(i = 0;i<10;i++)
{
cout << *(p_map+i);
}
memcpy(p_map,cs,10);
munmap(p_map,10);
}
½á¹ûÈçÏ£º
Administrator@GZHT-D1FF475D33 /LINUX/pro/hello
$ ./man1.exe cc
qwertyuiop
Administrator@GZHT-D1FF475D33 /LINUX/pro/hello
$ cat cc
helloworld
Ïà¹ØÎĵµ£º
×ÜÀÀ
ÓÃ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 ......
ʲôÊÇÇý¶¯£¿
×îͨË׵ĽâÊ;ÍÊÇ“ÇýʹӲ¼þÉ豸Ðж¯”
×÷Óã¿
É豸Çý¶¯Óëµ×²ãÓ²¼þÖ±½Ó´ò½»µÀ£¬°´ÕÕÓ²¼þÉ豸µÄ¾ßÌ幤×÷·½Ê½¶ÁдÉ豸¼Ä´æÆ÷£¬Íê³ÉÉ豸µÄÂÖѯ¡¢Öжϴ¦Àí¡¢DMAͨÐÅ£¬½øÐÐÎïÀíÄÚ´æÏòÐéÄâÄÚ´æµÄÓ³É䣬×îÖÕʹͨÐÅÉ豸Äܹ»ÊÕ·¢Êý¾Ý£¬Ê¹ÏÔʾÉ豸Äܹ»ÏÔʾÎÄ×ÖºÍ»Ãæ£¬Ê¹´æ´¢É豸Äܹ»¼Ç¼ÎļþºÅÊý¾Ý
¼ÆË ......
ÎÒÓõÄÊÇ×îÆÕͨµÄusbÉãÏñÍ·£¬Ö÷оƬΪÖÐÐÇ΢ZC0301P£¨¾Ý˵Êг¡Õ¼ÓÐÂÊ70£¥ÒÔÉÏ£©£¬COMS´«¸ÐÆ÷ΪhynixµÄhv7131e1,ÊÐÃæÉÏÄÜÂòµ½µÄ»ù±¾ÉÏÊÇÕâÖÖÅäÖá£
linuxÏÂÇý¶¯£¬ÎÒÖ±½ÓÒÆÖ²spca5xx£¬ÏÖÔÚ³öÁËspc5xx-le£¨Light-Edition for Linux Embedded£©¸ü·½±ã£¬Ö±½ÓÕë¶ÔǶÈëʽϵͳ×öÁËÓÅ»¯£¬¿ÉÒԲο¼ÕâÀïhttp://mxh ......
Ò첽֪ͨ£ºÒ»µ©É豸¾ÍÐ÷£¬ÔòÖ÷¶¯Í¨ÖªÓ¦ÓóÌÐò£¬ÕâÑùÓ¦ÓóÌÐò¸ù±¾²»ÐèÒª²éѯÉ豸״̬£¬ÕâÒ»µã·Ç³£ÀàËÆÓÚÓ²¼þÉϵēÖжϔµÄ¸ÅÄ±È½Ï׼ȷµÄ³ÆÎ½ÊÇ“ÐźÅÇý¶¯µÄÒì²½I/O
//Æô¶¯ÐźÅÇý¶¯»úÖÆ
signal(SIGIO, input_handler);//ÈÃinput_handler()´¦ÀíSIGIOÐźÅ
fcntl(fd, F_SETOWN, getpid());//Éè ......
1.´´½¨Ä¿Â¼
mkdir [-p][--help][--version][-m <Ŀ¼ÊôÐÔ>][Ŀ¼Ãû³Æ]
-m¿ÉÒÔ¶ÔĿ¼ÉèÖôæÈ¡È¨ÏÞ,Ò²¿ÉÒÔÓÃchmodeÃüÁîÉèÖÃ,
-p ¿ÉÒÔÊÇÒ»¸ö·¾¶Ãû³Æ,Èç¹û·¾¶ÖÐÓÐЩĿ¼²»´æÔÚ,ÄÇô»á×Ô¶¯´´½¨
2.ɾ³ý¿ÕĿ¼
Óï¡¡¡¡·¨£ºrmdir [-p][--hel ......