linuxϼÆËãÖ¸¶¨Ä¿Â¼ÏÂÓ°¼þµÄ´óС£¬»ùÓÚcÓïÑÔ
1//ÓÉÓÚʹÓÃgcc±àÒ룬ËùÒÔ±àÒëʱҪÁ´½ÓÉÏc++µÄ¿â£¬ÃüÁîÊÇgcc -lstdc++ main.cpp -o main
//±¾ÎÄС³ÌÐòʵÏÖµÄÊǶÔ/home/1.avi´óСµÄ¼ÆËã¡£ºÜ¼òµ¥£¬Ìù³öÀ´Ö»ÊÇΪÁË·½±ã²»ÖªµÀµÄÅóÓÑ
2 #include <stdio.h>
3 #include <stdlib.h>
4 #include <sys/stat.h>
5 #include <sys/types.h>
6 #include <unistd.h>
7 int main(int argc,char *argv[])
8 {
9 struct stat st;
10 float size;
11 if(stat("/home/1.avi",&st) == 0)
12 {
13 size =(((float)st.st_size)/1024)/1024;
14 printf("the exe is : %f M\n",size);
15
16 }
17
18 return 0;
19 }
Ïà¹ØÎĵµ£º
Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖÐÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀÐÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......
/***************************************************
* º¯Êý˵Ã÷: Åжϵ±Ç°path²ÎÊýÊÇ·ñΪһ¸ö¿É¶ÁµÄÎļþ
* º¯Êý·µ»Ø: 0 - Îļþ¿Ì¶È 1 - ȨÏ޾ܾø -1 -º¯Êý´íÎó
* ²Î Êý : path Îļþ·¾¶.
***************************************************/
int isReadFile(const char *path)
{
&nb ......
typedef struct StackNode
{
ElemType data;
StackNode *next;
)StackNode, *LinkType; &nb ......
ÔÚlinux/unixÏ£¬ÄãÊÇÔõôÖÐÖ¹Ò»¸öjava½ø³ÌµÄ£¿
Äã¿ÉÄÜ»á»Ø´ð kill -9 pid£¬ÕâÊÇÒ»ÖÖÔÚ¶àÊýÇé¿öÏÂÕýÈ·µÄ×ö·¨¡£²»¹ý£¬ÕâÖÖ·½Ê½¹ýÓÚ±©Á¦£¬Èç¹ûÓû§¶Ô»·¾³²»ÊìϤ£¬ºÜÈÝÒ×Ôì³ÉÖÂÃüµÄºó¹û¡£
±¾ÎĽ«·ÖÎökill -9²úÉúÎÊÌâµÄÔÒò£¬²¢¸ø³öÁíÒ»ÖÖ±ê×¼µÄkill·½Ê½¡£
±ê×¼ÖжÏÐźÅ
ÔÚLinuxÐźŻúÖÆÖУ¬´æÔÚ¶àÖÖ½ø³ÌÖжÏÐźţ¨LinuxÐ ......
ÕâÀï¸ø´ó¼ÒÌṩһ¸ö¿ªÆôºÍ¹Ø±ÕLINUX ·Å»ðǽµÄÃüÁîÒÔ¼° ÈçºÎ²é¿´·À»ðǽÊÇ·ñ°²×°ºÍÅäÖÃÇé¿ö
½â¾ö°ì·¨£º
¹Ø±Õ£º /etc/rc.d/init.d/iptables stop
Æô¶¯£º /etc/rc.d/init.d/iptables start
²é¿´µ±Ç°ÅäÖãºiptabl ......