ÔÚLinuxÏÂÿ¸ôһСʱ±£´æÒ»´ÎÍøÒ³£¬¸ÃÔõôд£¿
rt£¬Òª±£´æij¸öÌض¨µÄÍøÒ³ÄÚÈÝ£¬±ÈÈç
http://pic.sohu.com/
ÎÒÏÖÔÚÖ»ÖªµÀÒªÓõ½cronÃüÁÇë´ó¼Ò°ï°ï棬¿´¿´¸ÃÔõôд£¿
лл£¡
д¸ö³ÌÐò£¬httpÁ¬½Óµ½ÍøÕ¾£¬×ÔÈ»¾Í»áÏÂÔØÍøÒ³ÄÚÈÝÁË°É
ÔÚ¶Ô»° UNIX: ÊÊÓÃÓÚÈκΠUNIX ϵͳµÄ 10 ¸ö³öÉ«µÄ¹¤¾ßÖÐÕÒ"Óà cURL ÔÚ Internet ÉÏ×ö¸÷ÖÖÊÂÇé "
»òÐí,Äã¿ÉÒԵõ½Æô·¢.
»ØlsµÄÁ½Î»£¬ÊÇLinux£¬¶øÇÒ£¬ÎÒ²»»áд³ÌÐòѽ
ËùÒÔ²ÅÀ´ÕâÀïÇóÖúµÄ
ÎÊÌâ1£ºÄãÓýű¾»¹ÊÇC³ÌÐò£¿
ÎÊÌâ2£ºlinux¾ÍÊÇunix£¬unix²»ÊʾßÌåµÄÒ»¸öϵͳ£¬¶øÊÇÒ»×éϵͳµÄ±ê×¼£¬·ûºÏÕâ¸ö±ê×¼µÄ¾ÍÊÇnuix
ÌáÐÑ£ºunixÊÇΰ´óµÄϵͳ£¬ËùÒÔ£¬Ò»°ãÇé¿öÏÂÎÒÃÇÐèÒªµÄ¹¦Äܶ¼²»ÐèÒª×Ô¼ºÐ´£¬ºÜ¶à¶¼¿ÉÒÔÖ±½ÓÓÃÏÖÓеŤ¾ßÍê³É¡£¼Çס£º²»ÒªÖظ´Ôì³µÂÖ
shell˼·ÈçÏ£º
Éè¼ÆÒ»¸ö¿ØÖƳÌÐò£¬Ã¿¸öÒ»¸öСʱִÐÐÒ»´ÎץȡÍøÒ³ÈÎÎñ£¬Õâ¸ö¿ØÖƳÌÐò±¾ÉíÔÚϵͳÆô¶¯µÄʱºò¾ÍÒªÆô¶¯£¬Äã¿ÉÒÔ½«¿ØÖƳÌÐòµÄ½Å±¾·ÅÔÚAutostarÀïÃ棬»òÕßÊÇÆäËûµÄĿ¼¶¼¿ÉÒÔ£¬ÕâÒª¿´ÄãµÄ·þÎñÆ÷ÉÏͨ³£µÄ×ÔÆô¶¯½Å±¾ÔÚÄÄÀï·ÅÖã¿
ץȡÍøÒ³£º
ʹÓÃcurl¹¤¾ß£¨Ò²¾ÍÊÇÒ»¸öÃüÁ£¬ÔÚÉÏÃæµÄ¿ØÖƳÌÐòÀïµ÷ÓÃÕâ¸öÃüÁעÒ⣬ÄãÐèÒªÏȽ«¹¤×÷Ŀ¼ÉèÖóÉÄãÒª±£´æÍøÒ³ÄÚÈݵÄĿ¼£¬È»ºóÔÙµ÷ÓÃcurl¹¤¾ß¡£
»¹ÓÐÒ»¸ö£¬ÄãÒª¼ÇµÃ£¬¾ÍÊÇдºÃºó¸ù¾ÝÄãµÄÐèÒªÉèÖÃÕâ¸ö½Å±¾³ÌÐòµÄÖ´ÐÐȨÏÞ£¡
Ï£Íû¶ÔÄãÓÐÓÃ~~
crontab -e
¼ÓÈë
00 */1 * * * wget -c http://pic.sohu.com/ -o /tmp/index.html
»Ø4Â¥µÄ£¬
1¡¢ÎÒÊÇÏëÖ±½ÓÔÚÖÕ¶ËÀïÃæдÃüÁ²»ÓÃC£»
лл5Â¥µÄͬѧ£¬ÎÒÕâ¾ÍÈ¥ÊÔÊÔ
0 */1 * * * wget -c http://pic.sohu.com/ -o /tmp/index.html
ÎÒÓиöÎÊÌ⣬ÕâÐдúÂëÊÇ
Ïà¹ØÎÊ´ð£º
ʹÓÃStruts2ÉÏ´«Îļþ£¬ÔÚlinuxϱ¨´í
2009-09-29 14:56:20,801 [org.apache.struts2.interceptor.FileUploadInterceptor]-[ERROR] Processing of multipart/form-data request failed. c:/temp/upload__1dcd07ee_12 ......
Õ¾µãÏÂÓÐ×ÓÎļþ¼Ð script Îļþ¼ÐÏÂÓÐjsÎļþindex.js
¸ùĿ¼ÏÂÓÐÎļþindex.php
ÏëȨÏÞÉèÖóÉÖ±½Óͨ¹ýURL:http://www.abc.com/script/index.jsÎÞ·¨·ÃÎÊ,ÐèҪȨÏÞ
µ«ÊÇͨ¹ýindex.phpµ ......
СµÜ×î½üÐèÒªÒ»¸öÓÃsocket»ñÈ¡htmlÎĵµµÄ´úÂ룬µ«ÊÇÀÏÊDz»ÄÜ»ñÈ¡ÍêÕûµÄhtmlÔ´Âë¡£ÔÒò²»Ã÷£¬Íû¸ßÊÖÖ¸µã£¡
C/C++ code:
char *Http_GET(char *host,int port,char *data) //·¢ËÍGETÇëÇó
{
char response[2 ......
ÔÏȵÄGCC°æ±¾Îª4.1.2,ÎÒÖØбàÒë°²×°ÁËGCC4.3.2£¬µ«ÊDZàÒëÍê³ÌÐòÔËÐгÌÐòʱ»á³öÏÖversion `GLIBCXX_3.4.9' not found Õâ¸öÎÊÌâ.ÔÚÍøÉÏÃæ²éÁËÒ»ÏÂÊÇÈíÁ¬½ÓµÄÎÊÌâ¡£µ«ÊDZ¾È˶ÔLinux²»Ì«ÊìϤ£¬¡°Ó¦¸ÃÖÆ×÷RPM°üÈ»ºó ......