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

linux½ø³ÌͨÐÅѧϰ±Ê¼Ç


Linux½ø³Ì¼äͨÐŵķ½·¨
1¡¢¹ÜµÀ(pipe)
2¡¢ÓÐÃû¹ÜµÀ(named pipe)
3¡¢ÐźÅÁ¿
4¡¢ÏûÏ¢¶ÓÁÐ
5¡¢ÐźÅ
6¡¢¹²ÏíÄÚ´æ
7¡¢Ì×½Ó×Ö
-------------------------------------------------------------------------------
linux½ø³Ì¼äͨÐÅ
1. ¹ÜµÀ¡£
  ÄäÃûÒ»´ÎÐÔʹÓõ쬰ëË«¹¤¡£Ò»¸ö½ø³ÌÍùÊä³ö¶Ëд¹ÜµÀ£¬ÁíÒ»¸ö½ø³Ì´ÓÊäÈë¶Ë¶Á¹ÜµÀ¡£
  #include<unistd.h>
  int pipe(int fd[2]);
  fd[0]:±íʾ¶Á¶Ë
  fd[1]:±íʾд¶Ë
2. FIFOÌØ±ðÎļþ
  ÓÐÃû¹ÜµÀ£¬×÷ÎªÌØ±ðÎļþ´æ´¢ÓÚÎļþϵͳÖС£ÓÐÃû¹ÜµÀÒ»µ©½¨Á¢¾Í´æÔÚÓÚÎļþϵͳÖУ¬³ý·ÇÏÔʾµÄunlink
  #include<sys/tpes.h>
  #include<sys/stat.h>
  int mknod(const char *path,mode_t mod,dev_t dev);
  int mkfifo(const char *path,mode_t mode);
  path:´´½¨ÓÐÃû¹ÜµÀµÄȫ·¾¶Ãû
  mod:´´½¨ÓÐÃû¹ÜµÀµÄģʽ£¬Ö¸´æÈ¡È¨ÏÞ
  dev:É豸ֵ£¬¸Ãֵȡ¾öÓÚÎļþ´´½¨µÄÖÖÀ࣬ËüÖ»ÔÚ´´½¨É豸Îļþʱ²Å»áÓõ½
  ×¢Òâ:ÓÐÃû¹ÜµÀ´´½¨ºó¾Í¿ÉÒÔʹÓÃÁË£¬ÓÐÃû¹ÜµÀºÍ¹ÜµÀµÄʹÓ÷½·¨»ù±¾ÊÇÏàͬµÄ¡£Ö»ÊÇʹÓÃÓÐÃû¹ÜµÀµÄʱºò±ØÐëÏȵ÷ÓÃopen()½«Æä´ò¿ª
  ÒòΪÓÐÃû¹ÜµÀÊÇÒ»¸ö´æÔÚÓÚÓ²ÅÌÉϵÄÎļþ£¬¶ø¹ÜµÀÊÇ´æÔÚÓÚÄÚ´æÖеÄÌØÊâÎļþ
 
3. ÏûÏ¢¶ÓÁС¢ÐźÅÁ¿ºÍ¹²ÏíÄÚ´æ
   º¯Êý msgget semget shmget  msgctl semctl shmctl
   ÏûÏ¢¶ÓÁС¢ÐźÅÁ¿ºÍ¹²ÏíÄÚ´æ¶¼ÊÇipdc×ÊÔ´
   ÿ¸öipc×ÊÔ´ÓÐÁ½¸öΨһµÄ±êÖ¾ÓëÆäÏàÁ¬ ¹Ø¼ü×ֺͱêʶ£¨¹Ø¼ü×ÖÀàËÆÓÚÎļþÃû£¬±êÖ¾ÀàËÆÓÚÎļþÃèÊö×ÖÓÃÀ´·ÃÎÊ×ÊÔ´µÄ²Ù×÷£©
   ¹Ø¼ü×Ö»ñµÃº¯Êý
   #include<sys/types.h>
   #include<sys/ipc.h>
   key_t ftok(const char * pathname,int proj_id);
 
   ipc_perm{              //½á¹¹£¬µ±½ø³Ì´´½¨ipc×ÊԴʱ£¬Äں˴洢ÁËipc×ÊÔ´µÄÊôÖ÷ºÍ×éidºÍ·ÃÎÊȨÏÞµÈÐÅÏ¢¡£
     uid_t uid            //µ±Ç°ÓÐЧÓû§id
     gid_t gid            //µ±Ç°ÓÐЧ×éid
     cuid_t cuid 


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì (Æß) SDPЭÒé

Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖЭÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀЭÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......

LinuxϳÌʽµÄÄÚ´æÕ¼ÓÃ

±ÈÈçtopÕâ¸ö¹¤¾ß£¬Ëû»áÏÔʾ3ÖÖÊý¾Ý£¬×÷Õß·Ö±ð½âÊÍÈçÏ£º VIRT£ºvirtual memory usage¡£VirtualÕâ¸ö´Ê·Ç³£Éñ£¬Ò»°ã½âÊÍÊÇ£ºvirtual adj.ÐéµÄ, ʵÖʵÄ, [Îï]ÓÐЧµÄ, ÊÂʵÉϵġ£µ½µ×ÊÇÐéµÄ»¹ÊÇʵµÄ£¿ÈÃGoogle¸øDefineÖ®ºó£¬½«¾ÍÃ÷°×Ò»µã£¬¾ÍÊÇÕâ¶«Î÷»¹ÊÇ·ÇÎïÖʵ쬲»¹ýÓÐЧ¹ûµÄ£¬²»·¢ÉúÔÚÕæÊµÊÀ½çµÄ£¬·¢ÉúÔÚÈí¼þÊÀ½çµÄµÈµÈ¡£Õâ ......

LinuxÏÂWebminÅäÖÃ

Ò»¡¢Óû§¹ÜÀí»ù´¡
ÔÚLinux»·¾³Ï¶ÔÓû§µÄ¹ÜÀíÓжàÖÖ·½Ê½£¬°üÀ¨Óñ༭¹¤¾ßVi¡¢emacsµÈ¶Ô/etc/passwd½øÐвÙ×÷»òÖ±½ÓʹÓÃ
addusr¡¢deleusrµÈÓû§¹ÜÀíÃüÁîÒÔ¼°Ê¹ÓÃpwconvÃüÁîʹ/etc/passwdÓëshadowÎļþ±£³ÖÒ»Ö¡£ÎÒÃÇÏÈÀ´¿´¿´LinuxÏÂÓÃ
»§¹ÜÀíµÄ³£ÓòÙ×÷¶¼×öÁËЩʲô°É¡£
1¡¢Ôö¼ÓÓû§
Ôö¼ÓÓû§ÓÐÈý¸ö¹ý³Ì:
(1) ÔÚ/etc ......

linuxÉ豸Çý¶¯³ÌÐò——×Ö·ûÉ豸Çý¶¯³ÌÐò

ÔÚLinux²Ù×÷ϵͳÏÂÓÐ3ÀàÖ÷ÒªµÄÉ豸ÎļþÀàÐÍ£º¿éÉ豸¡¢×Ö·ûÉ豸ºÍÍøÂçÉ豸¡£ÕâÖÖ·ÖÀà·½·¨¿ÉÒÔ½«¿ØÖÆÊäÈë/Êä³öÉ豸µÄÇý¶¯³ÌÐòÓëÆäËû²Ù×÷ϵͳÈí¼þ·ÖÀ뿪À´¡£×Ö·ûÉ豸ÊÇÖ¸´æÈ¡Ê±Ã»Óлº´æµÄÉ豸¡£µäÐ͵Ä×Ö·ûÉ豸°üÀ¨Êó±ê¡¢¼üÅÌ¡¢´®Ðпڵȡ£
×Ö·ûÉ豸Óë¿éÉ豸µÄÖ÷񻂿±ðÊÇ£ºÔÚ¶Ô×Ö·ûÉ豸·¢³ö¶Á/дÇëÇóʱ£¬Êµ¼ÊµÄÓ²¼þI/OÒ»°ã½ô½Ó× ......

LinuxÏÂMySQL¶¨ÆÚ×Ô¶¯±¸·ÝÊý¾Ý¿â

MySQL :: Linux ÏÂ×Ô¶¯±¸·ÝÊý¾Ý¿âµÄ shell ½Å±¾
Linux ·þÎñÆ÷ÉϵijÌÐòÿÌì¶¼ÔÚ¸üРMySQL Êý¾Ý¿â£¬ÓÚÊǾÍÏëÆðдһ¸ö shell ½Å±¾£¬½áºÏ crontab£¬¶¨Ê±±¸·ÝÊý¾Ý¿â¡£Æäʵ·Ç³£¼òµ¥£¬Ö÷Òª¾ÍÊÇʹÓà MySQL ×Ô´øµÄ mysqldump ÃüÁî¡£
½Å±¾ÄÚÈÝÈçÏ£º
#!/bin/sh
# File: /home/mysql/backup.sh
# Database info
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ