linuxϵͳ±à³Ì´úÂë1
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
#include <time.h>
#include <unistd.h>
#define TIME_STRING_BUF 50
char * timestring(time_t t,char *buf)
{
struct tm *local;
local=localtime((&t);
strftime(buf,TIME_STRING_BUF,"%c",local);
return buf;
}
int statfile(const char * file)
{
struct stat statbuf;
char timebuf[TIME_STRING_BUF];
if (lstat(file,%statbuf))
{
fprintf(stderr,"could not lstat %s:%s\n",file,stderror(errno));
return 1;
}
printf("filename : %s\n",file);
printf("on device : major %d/minor %d inode number: %ld\n",major(statbuf.st_dev),minor(statbuf,st_dev),statbuf .st_ino)) )
printf("size :%-10ld type : %07o permissons :%05o",statbuf,st_size,statbuf .st_mode&S_IFMT,statbuf .st_mode&~(S_IFMT));
printf("ower :%d group :%d number of links :%d\n",statbuf .st_uid,statbuf .st_uid,statbuf .st_gid,statbuf .stnlink);
printf("change time :%s\n",timeString(statbuf ,st_ctime ,timeBuf));
printf("modified time :%s\n",timeString(statbuf ,st_ctime ,timeBuf));
printf("access time :%s\n",timeString(statbuf ,st_ctime ,timeBuf));
return 0;
int
main(int argc,const char **argv)
{
int i;
int rc=0;
for (i=1;i<argv;i++)
{
rc|=statFile(argv[i]);
if((argc-i)>1)
printf("\n");
}
return rc;
}
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
×î½üÏëÔÚLinuxÖ÷»úÉϼÜÉèOracle RAC,ËùÒÔ²»¶ÏµØÊÕ¼¯Ïà¹Ø×ÊÁÏ,²¢½øÐÐʵ¼ÊÑо¿.
ÏàÐÅ´ó¼ÒºÜ¿ì¾Í¿ÉÒÔÔÚÎҵIJ©¿ÍÖп´µ½Ïà¹ØµÄÑо¿ÐĵÃÁË.
ÔÚLinuxѧϰµÄÕâ¶Îʱ¼ä,¸Ð¾õËüÕæÊǷdz£ÆæÃî,ÈÃÎÒ¶ÔËüµÄÐËȤҲԽÀ´Ô½Å¨ÁË,Ï£ÍûÄܹ»¸üºÃ ......
Linux diffÓëpatchµÄÉîÈë·ÖÎö
http://blog.csdn.net/vrix/archive/2009/08/25/4483906.aspx
diffµÄÊä³ö¸ñʽ·ÖΪ´«Í³¸ñʽºÍͳһ¸ñʽ
1)diffµÄ´«Í³¸ñʽÊä³ö.
############################################
cat before.txt
Êä³ö:
This is a line to be deleted
This is a line that will be changed
This is a line ......