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

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ÈËÔعý¸úÍ·


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

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

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

ʵÓü¼ÇÉ£ºLinuxϵͳÏÂÎļþȨÏÞÉèÖ÷½·¨

  WindowsϵͳÆäʵºÍLinuxϵͳÓÐÏàËƵĵط½£¬WindowsϵͳÎļþ¡¢Ä¿Â¼µÄÊôÐÔÓÐÖ»¶Á¡¢Òþ²Ø£¬¶øLinuxÒ²Ò»Ñù¡£ LinuxÖУ¬Ã¿Ò»¸öÎļþ¶¼¾ßÓÐÌض¨µÄÊôÐÔ¡£Ö÷Òª°üÀ¨ÎļþÀàÐͺÍÎļþȨÏÞÁ½¸ö·½Ãæ¡£¿ÉÒÔ·ÖΪ5ÖÖ²»Í¬µÄÀàÐÍ£ºÆÕͨÎļþ¡¢Ä¿Â¼Îļþ¡¢Á´½ÓÎļþ¡¢É豸ÎļþºÍ¹ÜµÀÎļþ¡£ ËùνµÄÎļþȨÏÞ£¬ÊÇÖ¸¶ÔÎļþµÄ·ÃÎÊȨÏÞ£¬°üÀ¨¶Ô ......

linuxÐéÄâ»úÉÏÍø

ÐéÄâ»úlinux°æ±¾£ºredhat9.0
×ܽáһϣºÒª±£Ö¤ÐéÄâ»úϵͳ¿ÉÒÔÉÏÍø£¬µÃÏȽâ¾öÐéÄâ»úºÍÕæʵÖ÷»úµÄÁ¬½Ó¹Øϵ¡£VMwareÖ÷Òª¸ø³ö3ÖÖģʽ£¬ÎÒÃdz£ÓõÄÓГbridge£¨ÇŽӣ©”ºÍ
“Nat£¨ÍøÂçµØַת»»£©”·½Ê½¡£ÐéÄâ»úÉèÖ÷½·¨£ºµ¥»÷“ÐéÄâ»ú”→“ÉèÖÔ→“ÒÔÌ«Íø£¬È»ºóÑ¡ÔñÁ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ