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

PerlÎļþ²âÊÔ·û CµÄÓ÷¨

ÔÚPerlµÄ¸÷ÖÖÎļþ²âÊÔÔËËã·ûÖУ¬×îÓÐÓõÄÔËËã·ûÖ®Ò»¾ÍÊÇ -C ÁË¡£
Ëü·µ»ØµÄÊÇÎļþµÄctimeµ½³ÌÐòÆô¶¯µÄÄÇһʱ¿Ì¾­¹ýµÄÌìÊý¡£
Èç¹û²»ÊÇÕûÊýÌ죬·µ»ØÖµ¾Í´øÓÐСÊý¡£
Õâ¸öÔËËã·û¾­³£ÓÃÀ´¼ì²âÎļþÊÇ·ñ¹ýÆÚ£¬±ÈÈçÅжÏÎļþ¾àÀëÉÏ´ÎÐÞ¸ÄÊÇ·ñ³¬¹ýÁË3Ì죬
Èç¹û³¬¹ý¾Í½«Æäɾ³ý¡£µ«ÊÇ£¬ÄãÊÇ·ñÕæÕýÀí½â -C µÄ¹¤×÷Ô­ÀíÄØ£¿
ºÎνctime
ÒªÏëÀí½â-C£¬¾Í±ØÐëÀí½âʲôÊÇctime¡£ÎÒÃÇÖªµÀÎļþ²âÊÔÔËËã·ûµÄ·µ»ØÖµ¶¼ÊÇstatϵͳµ÷ÓõĽá¹û£¬
Òò´Ë´ÓstatµÄÎĵµÖоͿÉÒÔÕÒµ½´ð°¸£º
$ man 2 stat
...
The field st_ctime is changed by writing or by setting inode information
(i.e., owner, group, link count, mode, etc.).
¿É¼û£¬ctimeÊÇinodeµÄ¸üÐÂʱ¼ä£¬Òò´Ë²»½öÊǸıäÎļþÄÚÈÝ£¬Òƶ¯Îļþ¡¢ÐÞ¸ÄËùÓÐÕߵȲÙ×÷¶¼»á¸Ä±äctime¡£
ÕâƪÎÄÕÂ
˵µÃ¸üÏêϸ£º
ÎļþµÄ Change time£¬ctime ÊÇÔÚдÈëÎļþ¡¢¸ü¸ÄËùÓÐÕß¡¢È¨ÏÞ»òÁ´½ÓÉèÖÃʱ
Ëæ Inode µÄÄÚÈݸü¸Ä¶ø¸ü¸ÄµÄ¡£Ö»Òªstat³öÀ´µÄÄÚÈÝ·¢Éú¸Ä±ä¾Í»á·¢Éú¸Ä±ä¡£
mtimeµÄ¸Ä±ä±ØÈ»µ¼ÖÂctimeµÄ¸Ä±ä¡£
-CµÄÖµÈçºÎ¼ÆË㣿
perlµÄÎĵµÖжÔ-CÊÇÕâÑù˵Ã÷µÄ£º
$ perldoc -f -X
...
-M Script start time minus file modification time, in days.
-A Same for access time.
-C Same for inode change time (Unix, may differ for other platforms)
Ò²¾ÍÊÇ˵£¬-C Êǽű¾Ö´ÐпªÊ¼ÄÇÒ»¿Ì¾àÀëÎļþµÄctimeÖ®¼äµÄÌìÊý¡£
ÓüÆËãʽÀ´±íÊö£¬¿ÉÒÔÕâÑùд£º
(($^T - ((stat($filename))[10])) / 86400)
$^TÊÇPerl¿ªÊ¼Ö´ÐÐʱµÄʱ¼ä´Á¡£
Òò´Ë£¬ÔÚͬһ¸ö³ÌÐòÖÐÁ½´ÎÖ´ÐÐ -C µÄ½á¹ûÊÇÒ»ÑùµÄ¡£
ËùÒÔ£¬ÏÂÃæÕâ¸ö³ÌÐòµÃµ½µÄÊÇÏàͬµÄ½á¹û£º
print -C "foo.bar";
sleep 10;
print -C "foo.bar";
ͬÑù£¬ÔÚmod_perl»·¾³Ï£¬Ö»Òª·þÎñÆ÷ûÓÐÖØÆô£¬ÄÇôÈκÎʱºòÖ´ÐÐ-CµÃµ½µÄ½á¹û¶¼Ïàͬ¡£
£¨Êµ¼ÊÉÏÉÏÃæÕâ¾ä»°²¢²»ÑÏÃÜ£¬ÒòΪhttpd»áͬʱÆô¶¯Êý¸ö½ø³Ì£¬¶ø¶à¸ö½ø³ÌµÄ$^T²¢²»Ò»¶¨Ïàͬ£¬´Ó¶ø-CµÄ½á¹ûÒ²ÓпÉÄܲ»Í¬¡£
ÁíÍ⣬һ°ãÇé¿öÏÂhttpd½ø³ÌÔÚ´¦ÀíÍêÒ»¶¨µÄÇëÇóÖ®ºó£¬½ø³Ì»á½áÊø²¢Æô¶¯Ò»¸öнø³Ì£¬Ò²»áʹµÃ$^TÖØÖã¬Ó°Ïì-CµÄ½á¹û¡££©
ÄÇô£¬ÈçºÎ»ñµÃÖ´ÐÐ
ÄÇÒ»¿Ì¾àÀëctimeµÄÌìÊýÄØ£¿
ÓÐÁËÉÏÃæµÄ¹«Ê½£¬²»Äѵóö£¬Ó¦¸ÃÕâÑù¼ÆË㣺
(-C $filename) + (time() - $^T) / 86400


Ïà¹ØÎĵµ£º

C/S½á¹¹Web»¯£¬ÆƳýERP·Ö²¼Ä£Ê½Æ¿¾±

2009Ä꣬¾­¼ÃΣ»úÁýÕÖϵÄÖйú¹ÜÀíÈí¼þÐÐÒµ£¬ÓëÍùÄêÏà±È¾²Ä¬ÁËÐí¶à¡£²»¾ÃÇ°£¬SAPÖйúÑо¿Ôº×ܲÃÜÇÏé÷ëÅúÆÀ¹ú²úÈí¼þ¼¼Êõ»¹Í£ÁôÔÚ10ÄêÇ°¿Í»§¶Ë(Clien/Server)¼Ü¹¹Ë®Æ½£¬Òý·¢Òµ½çÒ»³¡´óÂÛÕ½¡£ÄÇôÖйú¹ÜÀíÈí¼þ¼¼ÊõÊÇ·ñÕæµÄÒѾ­Âäºó?
¡¡¡¡C/SÓ¦ÓÃÈÔÓÐÓÅÊÆ
¡¡¡¡ÄÇôÖйú¹ÜÀíÈí¼þ¼¼ÊõÊÇ·ñÒѾ­Âäºó?
¡¡¡¡C/S½á¹¹³ÌÐòÓëB/S(Web) ......

¿¼²éǶÈëʽC¿ª·¢ÈËÔ±×îºÃµÄÊ®µÀÌâ²Î¿¼´ð°¸

Ïêϸ²Î¿¼´ð°¸
µÚ1Ìâ:   (b)
volatile×ÖÃæÒâ˼ÊÇÒ×ÓÚ»Ó·¢µÄ¡£Õâ¸ö¹Ø¼ü×ÖÀ´ÃèÊöÒ»¸ö±äÁ¿Ê±£¬Òâζ×Å ¸ø¸Ã±äÁ¿¸³Öµ(дÈë)Ö®ºó£¬ÂíÉÏÔÙ¶ÁÈ¡£¬Ð´ÈëµÄÖµÓë¶ÁÈ¡µÄÖµ¿ÉÄܲ»Ò»Ñù,ËùÒÔ˵Ëü"ÈÝÒ×»Ó·¢"µÄ¡£
ÕâÊÇÒòΪÕâ¸ö±äÁ¿¿ÉÄÜÒ»¸ö¼Ä´æÆ÷£¬Ö±½ÓÓëÍⲿÉ豸ÏàÁ¬£¬ÄãдÈëÖ®ºó£¬¸Ã¼Ä´æÆ÷Ò²ÓпÉÄܱ»ÍⲿÉ豸µÄд²Ù×÷Ëù¸Ä±ä;»òÕ ......

linux c mkdir´´½¨µÝ¹éĿ¼

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define err(msg) perror(msg)
static void mkdirs(const char *dir)
{
        char tmp[1024];
        char *p;
 &nbs ......

¡¶win32»ã±à¡·Ê±ÖÓÖ®C´úÂë

#include <Windows.h>
#include <math.h>
#include "resource.h"
#define PI 3.1415976/180
int dwCenterX,dwCenterY,dwRadius;
const TCHAR *szAppName=TEXT("Clock");
LRESULT CALLBACK ProcWinMain(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
void ShowTime(HWND hwnd,HDC hdc);
void ......

Ò»¸ö¼òµ¥µÄC/S¶àÏß³ÌÓ¦ÓÃ

Ò»¸ö¼òµ¥µÄC/S¶àÏß³ÌÓ¦ÓÃ,ÉÔ΢À©Õ¹¾Í¿ÉÒÔÓÃÁË
/*socketÊÇÍøÂçÓ¦ÓóÌÐòµÄºËÐÄ£¬ÔÚ·þÎñÆ÷¶Ë»ò¿Í»§¶ËÍøÂçÓ¦ÓóÌÐòÖУ¬socket½ÔΪ²»¿ÉȱÉÙµÄÒªËØ
*ÔÚ·þÎñÆ÷³£¼ûµÄÓ¦ÓÃÓУºFTP·þÎñÆ÷£¬MAIL·þÎñÆ÷£¨SMTP£¬POP3£¬IMAP4ЭÒ飩£¬WEB£¨HTTPЭÒ飩
*½¨Á¢·þÎñÆ÷¶ËSOCKETµÄÓ¦ÓóÌÐò²½ÖèÈçÏ£º
*1¡£½¨Á¢·þÎñÆ÷¶ËµÄSOCKET£¬²¢ÇÒÒÔ´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ