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

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 }


Ïà¹ØÎĵµ£º

»ØÒäC¹ÅÀϵÄmath.h¿â FreeEIM

»ØÒäC¹ÅÀϵÄmath.h¿â
¸ÅÊö£º
¡¡¡¡math.hÖÐΪÎÒÃÇÌṩÁËÈý½Çº¯ÊýÊýÖµÔËËã¡¢Ö¸Êý¶ÔÊýÔËËã¡¢¾ø¶ÔÖµ¡¢Æ½·½Öµ¡¢ÒÔ¼°Ò»Ð©»ù±¾µÄÊýÖµ´¦Àí¡£
º¯Êý£ºsin
¹¦ÄÜ£º¼ÆË㻡¶ÈµÄÕýÏÒÖµ¡£
ʹÓÃ˵Ã÷£ºsin(x)£¬xΪ´«ÈëµÄ»¡¶ÈÖµ¡£
º¯Êý£ºcos
¹¦ÄÜ£º¼ÆË㻡¶ÈµÄÓàÏÒÖµ¡£
ʹÓÃ˵Ã÷£ºcos(x)£¬xΪ´«ÈëµÄ»¡¶ÈÖµ¡£
º¯Êý£ºtan
¹¦ÄÜ£º¼ÆË㻡¶È ......

C/C++ ÅжÏ·¾¶ÎªÎļþ

/***************************************************
* º¯Êý˵Ã÷: Åжϵ±Ç°path²ÎÊýÊÇ·ñΪһ¸ö¿É¶ÁµÄÎļþ
* º¯Êý·µ»Ø: 0 - Îļþ¿Ì¶È 1 - ȨÏ޾ܾø -1 -º¯Êý´íÎó
*   ²Î Êý : path Îļþ·¾¶.
***************************************************/
int isReadFile(const char *path)
{
  &nb ......

Solaris10»ù´¡:UNIX/Linux»ù±¾½á¹¹


1.1.5  UNIX
¡¡¡¡UNIX/Linux»ù±¾½á¹¹
¡¡¡¡Í¼1-3»æ³öÁËUNIXϵͳµÄ¸ß²ã´ÎµÄÌåϵ½á¹¹¡£Í¼ÖÐÐĵÄÓ²¼þ²¿·ÖÏò²Ù×÷ϵͳÌṩ»ù±¾·þÎñ¡£²Ù×÷ϵͳֱ½ÓÓëÓ²¼þ½»»¥£¬Ïò³ÌÐòÌṩ¹«¹²·þÎñ£¬²¢Ê¹
ËüÃÇͬӲ¼þÌØÐÔ¸ôÀë¡£µ±ÎÒÃǰÑÕû¸öϵͳ¿´³É²ãµÄ¼¯ºÏʱ£¬Í¨³£½«²Ù×÷ϵͳ³ÆÎªÏµÍ³Äںˣ¬»ò¼ò³ÆÄںˣ¬´Ëʱǿµ÷µÄÊÇËüͬÓû§³ÌÐòµÄ¸ôÀë¡ ......

linuxÃüÁîϵÁÐÖ®Ò»

du wzwz -h                  ²é¿´Ä¿Â¼»òÕßÎļþwzwzÕ¼ÓÿռäµÄ´óС
ls -1                        &n ......

AIXºÍLinuxÏÂÈçºÎ²é¿´CPUºÍÄÚ´æÐÅÏ¢

AIXºÍLinuxÏÂÈçºÎ²é¿´CPUºÍÄÚ´æÐÅÏ¢
AIX²Ù×÷ϵͳ
AIXµÄÓ²¼þÐÅÏ¢¿ÉÒÔͨ¹ýprtconfÃüÁî¿´µ½¡£
1. ²é¿´Âß¼­CPU¸öÊý
#pmcycles -m
CPU 0 runs at 4204 MHz
CPU 1 runs at 4204 MHz
CPU 2 runs at 4204 MHz
CPU 3 runs at 4204 MHz
CPU 4 runs at 4204 MHz
CPU 5 runs at 4204 MHz
CPU 6 runs at 4204 MHz
CPU 7 runs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ