accessº¯ÊýºÍopenº¯ÊýµÄÇø±ð - C/C++ / CÓïÑÔ
accessº¯ÊýºÍopenº¯ÊýµÄÇø±ð
60 if(access(path,R_OK)==0)
61 printf("access read success \n");
62 else
63 printf("access read error \n ");
64 if(open(path,O_RDONLY)<0)
65 printf("open read success \n");
66 else
67 printf("open errror success \n");
stam@MyOpenSuSE:~/resently/c_lang/access> ls -al duck.txt
-rw-r--r-- 1 stam users 0 04-20 10:41 duck.txt
Ϊʲôaccess ×ÜÊÇ»áread error £¿£¿£¿ÓÃls ÃüÁî²é¿´È¨ÏÞÊÇreadable²Å¶Ô°¢£¬¶øopen·µ»ØÖµÊÇopen success ,²»Ã÷°×Ϊʲô £¬Ð»Ð»´ó¼Ò
»ØlsÁ½Î»ÎÒ¾ÍÊÇ¿´ÁËÊéûÓÐŪ¶®,ÄÜ·ñ½âÊ͵ÄÏêϸһЩ.ÊéÉÏ˵accessº¯ÊýÊÇ°´ÕÕʵ¼ÊÓû§IDºÍʵ¼Ê×éID½øÐзÃÎÊȨÏÞ²âÊÔ??
ÎÒ²»´óÃ÷°×ʲôÊÇʵ¼ÊÓû§ID£¬Ê²Ã´ÊÇÓÐЧÓû§ID£¿£¿
Ïà¹ØÎÊ´ð£º
дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
ÈçÌ⣬C/C++ÖеÄexeclÔõôµ÷ÓÃдºÃµÄjava³ÌÐò£¬
execl("/opt/java1.5/bin/java","MyClass",NULL);
ÕâÑùµÄ²»ÐÐŶ¡£
²»»á.
ÔËÐÐjava³ÌÐò
ÕÒ¹¤¾ß²é¿´Ò»ÏÂÄǸö³ÌÐòµÄÃüÁîÐÐ
ËÑË÷Ï£ºjni ......
±¾ÈËÕýÔÚÓÃJava×öÒ»¸öC/S¼Ü¹¹µÄÏîÄ¿£¬
¿ÉÊÇÓÉÓÚÏîÄ¿±È½Ï´ó£¬Ç°ÆڶԼܹ¹µÄÉè¼ÆÓÈÆäÖØÒª£¬ÒòΪºóÆÚ¿ÉÄÜËæʱ»á¼Ó¸ö¹¦ÄÜ»òÕßÈ¥µôijЩ¹¦ÄÜ¡£
ËùÒÔÌصØÑ°ÇóÈçºÎÉè¼ÆC/SµÄ¼Ü¹¹Ê¹³ÌÐò¸ü¼ÓÃæÏò¶ÔÏó¸ü¼ÓÒ×ÓÚά ......
ÓÐÒ»¸öÊý¾Ý¿âÀïÖ»ÓÐ2WÌõÊý¾Ý²»µ½£¬È´ÓÐ500MÄÇô´ó,Ôõô»ØÊ°¡£¿ÊÇACCESSµÄÊý¾Ý¿â¡£ºóÀ´ÎÒ°ÑACCESSµ¼Èëµ½MSSQLÖУ¬Ò²Õ¼ÓÃÁË500M×óÓҵĿռ䣬Èç¹ûѹËõÊý¾Ý¿âÄØ£¿Çë¸ßÊÖÖ¸µã
ѹËõÊý¾Ý¿â£¿ÄÜ×öµ½Ã´...
ÆÚ´ý¸ßÈËÖ¸µã ÎÒ ......
´ó¼ÒºÃ£º
ÎÒÏëʵÏÖ¼ì²âµ½²åÈëSD¿¨ºó×Ô¶¯½«SD¿¨¸ñʽ»¯µÄ¹¦ÄÜ£¬²»ÖªC/C++ÖÐÓÐûÓиñʽ»¯UÅ̵ĺ¯Êý£¿
ÁíÍ⣬ÎÒ²»ÏëʹÓÃSHFormatDrive£¬ÒòΪÕâ¸öº¯Êý»áµ¯³öÊÇ·ñÒª¸ñʽ»¯µÄÌáʾ¿ò£¬ÎÒÐèÒªµÄÊÇϵͳ×Ô¶¯¸ñʽ»¯£¬¶ø²Ù×÷Õß² ......