linux ²éÕÒÖ´ÐгÌÐòµÄµ±Ç°Â·¾¶
linux shell pwd ÏÔʾµ±Ç°Â·¾¶
¼ÙÈôÓÐtest.cpp
g++ test.cpp -o test
./test
ÏëÔÚtestÖÐÕÒµ½µ±Ç°Ö´ÐгÌÐòËùÔڵķ¾¶
¿ÉÒÔÔÙtest.cppÖÐʹÓÃreadlinkº¯Êý
¾ßÌå¼ûÈçÏÂʵÀý£º
#include<iostream>
#include<unistd.h>
#include<dirent.h>
#include<string.h>
#include<string>
using namespace std;
int main()
{
char buff[1024];
memset(buff,0,sizeof(buff));
int n = readlink("/proc/self/exe",buff,1023);
if(n<0)
{
cout<<"Get Path failed"<<endl;
return -1;
}
string path = buff;
int nLen = path.rfind('/');
path.erase(nLen,path.length() - nLen);
cout<<"zui zhong lu jing :"<<path<<endl;
return 0;
}
½÷¼ÇÊÇ/proc/self/exe ÔÚ´ËijÈËÔعý¸úÍ·
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖÐÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀÐÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......
WindowsϵͳÆäʵºÍLinuxϵͳÓÐÏàËƵĵط½£¬WindowsϵͳÎļþ¡¢Ä¿Â¼µÄÊôÐÔÓÐÖ»¶Á¡¢Òþ²Ø£¬¶øLinuxÒ²Ò»Ñù¡£ LinuxÖУ¬Ã¿Ò»¸öÎļþ¶¼¾ßÓÐÌض¨µÄÊôÐÔ¡£Ö÷Òª°üÀ¨ÎļþÀàÐͺÍÎļþȨÏÞÁ½¸ö·½Ãæ¡£¿ÉÒÔ·ÖΪ5ÖÖ²»Í¬µÄÀàÐÍ£ºÆÕͨÎļþ¡¢Ä¿Â¼Îļþ¡¢Á´½ÓÎļþ¡¢É豸ÎļþºÍ¹ÜµÀÎļþ¡£ ËùνµÄÎļþȨÏÞ£¬ÊÇÖ¸¶ÔÎļþµÄ·ÃÎÊȨÏÞ£¬°üÀ¨¶Ô ......
ÐéÄâ»úlinux°æ±¾£ºredhat9.0
×ܽáһϣºÒª±£Ö¤ÐéÄâ»úϵͳ¿ÉÒÔÉÏÍø£¬µÃÏȽâ¾öÐéÄâ»úºÍÕæʵÖ÷»úµÄÁ¬½Ó¹Øϵ¡£VMwareÖ÷Òª¸ø³ö3ÖÖģʽ£¬ÎÒÃdz£ÓõÄÓГbridge£¨ÇŽӣ©”ºÍ
“Nat£¨ÍøÂçµØַת»»£©”·½Ê½¡£ÐéÄâ»úÉèÖ÷½·¨£ºµ¥»÷“ÐéÄâ»ú”→“ÉèÖÔ→“ÒÔÌ«Íø£¬È»ºóÑ¡ÔñÁ ......