linux ÏÂc ³ÌÐò ¶Î´íÎó ·ÖÎö
linux ÏÂc ³ÌÐò ¶Î´íÎó ·ÖÎö
(2008-12-31 16:50:57)
var $tag='it';
var $tag_code='2cec03ae0a5b0d224bb35c9b79dd54c7';
±êÇ©£ºit
·ÖÀࣺC/C++
fopen("/var/spool/cron/tmp","w+");
/////////////////////////////////////////
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(){
int ret=-1;
printf("***************************************
delPolicy
***************************************************\n");
FILE *f;
f=fopen("var/spool/cron/tmp","w");
if(f==NULL)
{
printf("open tmp failed!\n");
fclose(f);
return -1;
}
printf("open two files
successfully!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
fclose(f);
ret=0;
printf("***************************************
delPolicy
***************************************************\n");
return ret;
}
³öÏֶδíÎó:
ÔÒò:1:"/var/spool/cron/tmp"´íд³É"var/spool/cron/tmp"
2:ÎļþÃû²»ÄÜΪtmp¹Ø¼ü×Ö,¿ÉΪmytmp
²úÉú¶Î´íÎó¾ÍÊÇ·ÃÎÊÁË´íÎóµÄÄÚ´æ¶Î£¬Ò»°ãÊÇÄãûÓÐȨÏÞ£¬»òÕ߸ù±¾¾Í²»´æÔÚ¶ÔÓ¦µÄÎïÀíÄÚ´æ,ÓÈÆä³£¼ûµÄÊÇ·ÃÎÊ0µØÖ·.
Ò»°ãÀ´Ëµ,¶Î´íÎó¾ÍÊÇÖ¸·ÃÎʵÄÄڴ泬³öÁËϵͳËù¸øÕâ¸ö³ÌÐòµÄÄÚ´æ¿Õ¼ä£¬Í¨³£Õâ¸öÖµÊÇÓÉgdtrÀ´±£´æµÄ£¬ËüÊÇÒ»¸ö48λµÄ¼Ä´æÆ÷£¬
ÆäÖеÄ32λÊDZ£´æÓÉËüÖ¸ÏòµÄgdt±í£¬ºó13λ±£´æÏàÓ¦ÓÚgdtµÄϱ꣬×îºó3λ°üÀ¨Á˳ÌÐòÊÇ·ñÔÚÄÚ´æÖÐÒÔ¼°³ÌÐòµÄÔÚcpuÖеÄÔËÐм¶±ð,
Ö¸ÏòµÄgdtÊÇÓÉÒÔ64λΪһ¸öµ¥Î»µÄ±í£¬ÔÚÕâÕűíÖоͱ£´æ×ųÌÐòÔËÐеĴúÂë¶ÎÒÔ¼°Êý¾Ý¶ÎµÄÆðʼµØÖ·,ÒÔ¼°Óë´ËÏàÓ¦µÄ¶ÎÏÞºÍÒ³Ãæ½»»»,
»¹ÓгÌÐòÔËÐм¶±ð»¹ÓÐÄÚ´æÁ£¶ÈµÈµÈµÄÐÅÏ¢¡£Ò»µ©Ò»¸ö³ÌÐò·¢ÉúÁËÔ½½ç·ÃÎÊ£¬cpu¾Í»á²úÉúÏàÓ¦µÄÒì³£±£»¤£¬ÓÚÊÇsegmentation
fault¾Í³öÏÖÁË.
ÔÚ±à³ÌÖÐÒÔϼ¸Àà×ö·¨ÈÝÒ×µ¼Ö¶δíÎó,»ù±¾ÊÇÊÇ´íÎóµØÊ¹ÓÃÖ¸ÕëÒýÆðµÄ
1)·ÃÎÊϵͳÊý¾ÝÇø£¬ÓÈÆäÊÇÍù
ϵͳ±£»¤µÄÄÚ´æµØÖ·Ð´Êý¾Ý×î³£¼û¾ÍÊǸøÒ»¸öÖ¸ÕëÒÔ0µØÖ·
2)ÄÚ´æÔ½½ç(Êý×éÔ½½ç£¬±äÁ¿ÀàÐͲ»Ò»ÖµÈ) ·ÃÎÊ
Ïà¹ØÎĵµ£º
ת×Ô£ºhttp://blog.chinaunix.net/u/12367/showart_243938.html
at ºÍ batch ´Ó±ê×¼ÊäÈë»òÒ»¸öÖ¸¶¨µÄÎļþ¶ÁÈ¡ÃüÁÕâЩÃüÁîÔÚÒÔºóij¸öʱ¼äÓà /bin/sh Ö´ÐС£
At ÔÊÐíÏ൱¸´ÔÓµÄʱ¼äÖ¸¶¨£¬ËüÀ©Õ¹ÁË POSIX.2 ±ê×¼¡£
Ëü½ÓÊÜ HH:MM µÄʱ¼äʽÑù£ ......
Swap£¬¼´½»»»Çø£¬³ýÁ˰²×°LinuxµÄʱºò£¬ÓжàÉÙÈ˹ØÐĹýËüÄØ?Æäʵ£¬SwapµÄµ÷Õû¶ÔLinux·þÎñÆ÷£¬ÌرðÊÇWeb·þÎñÆ÷µÄÐÔÄÜÖÁ¹ØÖØÒª¡£Í¨¹ýµ÷ÕûSwap£¬ÓÐʱ¿ÉÒÔÔ½¹ýϵͳÐÔÄÜÆ¿¾±£¬½ÚʡϵͳÉý¼¶·ÑÓá£
¡¡¡¡SwapµÄÔÀíÊÇÒ»¸ö½Ï¸´ÔÓµÄÎÊÌ⣬ÐèÒª´óÁ¿µÄƪ·ùÀ´ËµÃ÷¡£ÔÚÕâÀïÖ»×÷¼òµ¥µÄ½éÉÜ£¬ÔÚÒÔºóµÄÎÄÕÂÖн«ºÍ´ó¼ÒÏêϸÌÖÂÛSwapʵÏÖµÄϸ½Ú ......
ÔÚLinuxϵͳÖУ¬ÖÕ¶ËÉ豸·Ç³£ÖØÒª£¬Ã»ÓÐÖÕ¶ËÉ豸£¬ÏµÍ³½«ÎÞ·¨ÏòÓû§·´À¡ÐÅÏ¢£¬LinuxÖаüº¬¿ØÖÆÌ¨¡¢´®¿ÚºÍαÖÕ¶Ë3ÀàÖÕ¶ËÉ豸¡£
14.1ÖÕ¶ËÉ豸
ÔÚLinuxϵͳÖУ¬ÖÕ¶ËÊÇÒ»ÖÖ×Ö·ûÐÍÉ豸£¬ËüÓжàÖÖÀàÐÍ£¬Í¨³£Ê¹ÓÃttyÀ´¼ò³Æ¸÷ÖÖÀàÐ͵ÄÖÕ¶ËÉ豸¡£ttyÊÇTeletypeµÄËõд£¬TeletypeÊÇ×îÔç³öÏÖµÄÒ»ÖÖÖÕ¶ËÉ豸£¬ ......
1. cd -> ·µ»Ø½øÈë´ËĿ¼֮ǰËùÔÚµÄĿ¼£ºcd -
2. ÉÏÒ»ÌõÃüÁî ->
!! È«²¿µÄÉÏÒ»ÌõÃüÁî
!* ÉÏÒ»ÌõÃüÁîµÄÈ«²¿²ÎÊý
& ......
ÔÚÇ°ÃæµÄ»ù´¡ÉÏ£¬ÏÂÃæ¿ªÊ¼ÀûÓÃskyeye×Ô´øµÄtestsuitesÖеÄ×ÊÔ´À´ÔËÐÐ×Ô¼ºµÄ³ÌÐòµÄ·½·¨
1.Ê×ÏÈÊÇÏÂÔØÏÂÔØskyeye-1.2.5_REL.tar.gz£¬È»ºó½âѹ¸ÃÎļþ
2.ʹÓÃskyeyeÄ£Äâ°å×Ós3c2410ÔËÐÐij¸ölinux
Ê×ÏȽøÈë½âѹÍêµÄĿ¼£¬È»ºó
cd ./linux/s3c2410/s3c2410x-2.6.14
skyeye –c skyeye.conf –e vmlinux
×¢ÒâµÄÊÇs ......