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

Linux¶¨Ê±Æô¶¯ÈÎÎñµÄһЩÃüÁî...

/*
 * Ò»ÄêÇ°ÕûµÄһЩ×ÊÁÏ£¬ÔÚ²»Åª³öÀ´Õæ²»ÖªµÀÄÇÌì¾ÍûÁË£¬±¾ÉíÎÒÊǸöÀÁÉ¢µÄÈË£¬Ò²²»ÏëÔÙÕÒµÚ¶þ´Î£¡
 * ÏÂÃæµÄÄÚÈÝÒ²ÊÇÒÔÇ°baidu/GoogleµÄ£¬È»ºóÕûÀíÁËÏÂÃæµÄ×ÊÁÏ¡£ÍüÁËÊDz»ÊǶ¼ÄÜÓÃÁË£¬µ±Ê±Ö»ÊÔÁËÒ»²¿·Ö¡£¡£¡£
 */
ҪʹÓÃ×Ô¶¯Æô¶¯½ø³ÌµÄ¹¦ÄÜ,¾ÍÐèÒªÕÆÎÕÒÔϼ¸¸öÆô¶¯ÃüÁî:
  at ÃüÁî
==================================================================
  at [-V] [-q ¶ÓÁÐ ] [-f ÎļþÃû ] [-mldbv] ʱ¼ä
  at -c ×÷Òµ [ ×÷Òµ ...]
  at ÔÊÐíʹÓÃÒ»Ì×Ï൱¸´ÔÓµÄÖ¸¶¨Ê±¼äµÄ·½·¨,ʵ¼ÊÉÏÊǽ« POSIX.2 ±ê×¼À©Õ¹ÁË¡£Ëü¿ÉÒÔ½ÓÊÜÔÚµ±ÌìµÄ hh:mm (Сʱ  : ·ÖÖÓ)ʽµÄʱ¼äÖ¸¶¨¡£Èç¹û¸Ãʱ¼äÒѾ­¹ýÈ¥,ÄÇô¾Í·ÅÔÚ µÚ¶þÌìÖ´ÐС£Óû§»¹¿ÉÒÔ²ÉÓà 12 Сʱ¼ÆʱÖÆ,¼´ÔÚʱ¼äºóÃæ¼ÓÉÏ AM (ÉÏÎç)»òÕß PM (ÏÂÎç)À´ËµÃ÷ÊÇÉÏÎ绹ÊÇÏÂÎç¡£¿ÉÒÔÖ¸¶¨ÃüÁîÖ´ÐеľßÌåÈÕÆÚ,Ö¸¶¨¸ñʽΪ month day (Ô ÈÕ)»òÕß mm/dd/yy (Ô / ÈÕ / Äê)»òÕß dd.mm.yy (ÈÕ . Ô . Äê)¡£Ö¸¶¨µÄÈÕÆÚ±ØÐë¸úÔÚÖ¸¶¨Ê±¼ä µÄºóÃæ¡£
  ÉÏÃæ½éÉܵĶ¼ÊǾø¶Ô¼Æʱ·¨,Æäʵ»¹¿ÉÒÔʹÓÃÏà¶Ô¼Æʱ·¨¡£ Ö¸¶¨¸ñʽΪ: now + count time-units , now ¾ÍÊǵ±Ç°Ê±¼ä, time-units ÊÇʱ¼äµ¥Î»,ÕâÀï¿ÉÒÔÊÇ minutes (·ÖÖÓ)¡¢ hours (Сʱ)¡¢ days (Ìì)¡¢ weeks (ÐÇÆÚ)¡£ count ÊÇʱ¼äµÄÊýÁ¿,¾¿¾¹ÊǼ¸Ìì,»¹ÊǼ¸Ð¡Ê±,µÈ µÈ¡£»¹ÓÐÒ»ÖÖ¼Æʱ·½·¨¾ÍÊÇÖ±½ÓʹÓà today (½ñÌì)¡¢ tomorrow (Ã÷Ìì)À´Ö¸¶¨Íê³ÉÃüÁîµÄʱ¼ä¡£
  [Àý]Ö¸¶¨ÔÚ½ñÌìÏÂÎç 5:30 Ö´ÐÐijÃüÁî¡£¼ÙÉèÏÖÔÚʱ¼äÊÇÖÐÎç 12:30 , 2008 Äê 2 Ô 24 ÈÕ,ÆäÃüÁî¸ñʽÈçÏÂ:
  at 5:30pm
  at 17:30
  at 17:30 today
  at now + 5 hours
  at now + 300 minutes
  at 17:30 24.2.99
  at 17:30 2/24/99
  at 17:30 Feb 24
[Àý]
  $at -f work 4pm + 3 days
  ÔÚÈýÌìºóÏÂÎç 4 µãÖ´ÐÐÎļþ work ÖеÄ×÷Òµ¡£
  $at -f work 10am Jul 31
  ÔÚ 7 Ô 31 ÈÕÉÏÎç 10 µãÖ´ÐÐÎļþ work ÖеÄ×÷Òµ¡£
  ÔÚÈκÎÇé¿öÏÂ,³¬¼¶Óû§¶¼¿ÉÒÔʹÓÃÕâ¸öÃüÁî¡£¶ÔÓÚÆäËûÓû§À´Ëµ,ÊÇ·ñ¿ÉÒÔʹÓþÍÈ¡¾öÓÚÁ½¸öÎļþ: /etc/at.allowºÍ /etc/at.deny ¡£Èç¹û /etc/at.allow Îļþ´æÔڵĻ°,ÄÇôֻÓÐÔÚÆäÖÐÁгöµÄÓû§²Å¿ÉÒÔʹÓà at ÃüÁî;Èç¹û¸ÃÎļþ²»´æÔÚ,ÄÇô½«¼ì²é /etc/at.deny ÎļþÊÇ·ñ´æÔÚ,ÔÚÕâ¸öÎļþÖÐÁгöµÄÓû§¾ù²»ÄÜʹÓøÃÃüÁî¡£Èç¹ûÁ½¸öÎļþ¶¼²»´æÔÚ,ÄÇôֻÓг¬¼¶Óû§


Ïà¹ØÎĵµ£º

linux²Ù×÷ϵͳ°²×°python3

Ê×ÏÈÊÇÏÂÔØpython3£¬ÏÖÔÚµÄ×î¸ß°æ±¾ÊÇ3.1.1
for linux¡£
ÎҵķÅÖ÷¾¶ÊÇ/home/pythonÏ·ÅÖÃPython-3.1.1.tgz,Ö´ÐÐÒÔÏÂϵÁвÙ×÷£º
1.½âѹ£ºtar zxvf Python-3.1.1.tgz----Éú³É½âѹ°üPython-3.1.1
2.ת»»µ½Python-3.1.1·¾¶Ï£¬Ö´ÐÐ./configure
3.make
4.make install
ÔÚrehl5ÖÐÒѾ­Ä¬ÈÏ°²×°ÁËpython2.4,ËùÒÔÒª×öÈçÏ ......

linux shell pid

¼ÙÉèÊÇÆô¶¯Ò»¸ö rails ³ÌÐò£º
ruby script/server
ͨ³£»áÕâÑù£º
nohup ruby script/server &
°Ñ´íÎóÊä³öÁ÷Ò²¶¨Ïòµ½Õý³£Êä³öÁ÷ÖУº
nohup ruby script/server & 2 > 1 &
Òª¼Ç¼Ï pid £º
nohup ruby script/server & 2 > 1 & echo $! > tmp/pid &
¾­¹ý·´¸´µ÷ÊÔ£¬ÉÏÃæµÄÓï¾äËƺõ²»Í ......

linux ϵͳÏÂʹÓÃC³ÌÐòʵÏÖʱÖӵĺ¯Êý

#include "stdio.h"
#include "math.h"
#include "time.h"
#define INTERVAL 1  ¶¨ÒåºêµÄʱ¼ä¼ä¸ôΪ1Ãë
//
void On_Time()  //ÿһÃ뼤·¢µÄʼþ
{
   printf("now=%s\n","JJK"); 
}
void Timer()  //ʱÖӵĺ¯Êý
{  time_t newclk,oldclk;
   while(1)
 &nb ......

linux c socket ¿ª·¢Óë±àÒëʵÀý

ÕâƪÈÕÖ¾»¹ÊÇÏÈ´ÓÒ»¸öÄܹ»ÔËÐÐÆðÀ´µÄÀý×Ó³ö·¢£¬Ò»µ©ÄÜ˳ÀûµÄ¿´µ½³ÌÐòµÄ³É¹¦ÔËÐУ¬ÄÇô½ÓÏÂÀ´µÄʼþÎÒÏëÓ¦¸ÃÊÇÎÊΪʲôÁË£¿ËƺõÕâÑù¸ü¼ÓÈÝÒ×Àí½âºÍÕÆÎÕ¡£
¶ÔÓÚsocket³ÌÐòµÄ¸ÅÄîÕâÀï¾Í²»¶àдÁË£¬µ«ÎÒÏàÐÅ£¬Èç¹ûÄÜ¿´ÍêÕâÕûƪÎÄÕ£¬ÎÒÏàÐŲ»»áÔÙÓÐÕâÑùµÄÒÉÎʵġ£
ÏÂÃ潫±àдһ¸öc/s½á¹¹µÄ³ÌÐò£¬Ö÷Òª¹¦ÄÜÊÇclient½«Ïòserver·¢Ë ......

Linux ϱàÒëhello world µÄC ÓïÑÔ³ÌÐò

±¾À´ÎÒÓõÄÊÇÕâÑùµÄ³ÌÐò
# include <iostream.h>
int main(void)
{
  int i,j;
  j=0;
  i=j+1;
  cout<<"hello world!"<<endl;
  cout<<"the result is"<<i<<endl;
  return 0;
}
ÀûÓÃg++ -o test test.cpp¡£µ«ÊÇÕâÑùÊÇÓдíÎóµÄ£¬ÌáʾÎÞ·¨´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ