LinuxÖÐʱ¼ä´Áת»»ÃüÁî
ÔÎĵØÖ·£ºhttp://wanping.blogbus.com/logs/28663569.html
1¡¢Ê±¼ä´Áת»»ÎªÕý³£ÏÔʾµÄʱ¼ä¸ñʽ
Freebsd
ϵͳÏ£º
ת»»ÃüÁîΪ£º
date -r 1112173761 »òÕߣºdate -r 1112173761 +"%Y-%m-%d %T %z"£¨ÄêÔÂÈյĸñʽ²»Ò»Ñù£©
Linux
ϵͳÏ£º
ת»»ÃüÁdate -d '1970-01-01 UTC 1112173761 seconds'" »òÕß date -d '1970-01-01 UTC 1112173761 seconds' +"%Y-%m-%d %T %z" £¨ÄêÔÂÈÕ¸ñʽ²»Ò»Ñù£©
ʱ¼ä´Áת»»ÎªÕý³£ÏÔʾµÄʱ¼ä¸ñʽ£¬ÎÊÌâ½â¾öÁË£¬ÄÇôÈçºÎ°ÑÎÒÃÇÕý³£µÄʱ¼ä¸ñʽתΪʱ¼ä´ÁÄØ
2¡¢Õý³£ÏÔʾµÄʱ¼ä¸ñʽת»»ÎªÊ±¼ä´Á
php°Ñµ±Ç°Ê±¼äת»»ÎªÊ±¼ä´Á
php -r "echo(mktime());"
ÕâÀïÐèҪ˵Ï£¬Ê¹ÓÃ
php
µÄʱºò£¬Èç¹û²»Ïëÿ´Î¶¼ÔÚÎļþÖбàдִÐУ¬¾ÍÊÇÓÃ
php -r
ÃüÁ¾Í°ÑºóÃæµÄ½Å±¾Ö´ÐÐÁË¡£
php°ÑδÀ´Ä³ÌìµÄʱ¼äתΪʱ¼ä´Á
php -r "echo(strtotime('+2 days'));"
//
°ÑºóÌìµÄʱ¼äתΪʱ¼ä´Á
ÎÒ²âÊÔµÄϵͳÐèÒª°Ñ¹ýÆÚʱ¼ä±È½Ï¾Ã£¬ÄÇôÖÁÉÙÒªÔÚÎÒ²âÊÔÍêϵͳ²ÅÒªËû¹ýÆÚ£¬²»ÐèҪÿ´Îʱ¼äµ½ÁËÓÖÒª¸ü»»¹ýÆÚʱ¼ä£¬ÎҾͰѹýÆÚʱ¼äÉèΪ
100
Ì죬ִÐÐÃüÁîÈçÏ£º
php -r "echo(strtotime('+100 days'));"
Linux¡¢FreeBsdϵͳµ±Ç°Ê±¼äת»»ÎªÊ±¼ä´Á£º
date +%s
Ïà¹ØÎĵµ£º
1¡¢Éý¼¶ÏµÍ³
yum check-update
yum update
2¡¢°²×°Ò»Ð©³£ÓõŤ¾ß
yum install ntp iptraf sysstat screen subversion wget bzip2 nfs-utils vim-common
3¡¢ÉèÖÃÿÌì×Ô¶¯ºË׼ʱ¼ä
# crontab -e
0 * * * * /usr/sbin/ntpdate 210.72.145.44
:wq
4¡¢°²×°Ò»Ð©¿ª·¢°ü
# yum install make gcc gcc-c++ libjpeg-devel ......
ת×Ô£ºhttp://www.cic.tsinghua.edu.cn/jdx/book1/CHAPTER3.htm
ÔÚÔ´Îļþ¿ªÊ¼Ôö¼Ó#include <winsock.h>Óï¾ä¡£
µ÷ÓÃWSAStartup()º¯Êý³õʼ»¯Windows Sockets DLL£¬²¢ÔÚ½áÊøʱµ÷ÓÃWSACleanup()º¯Êý֪ͨWindows Sockets DLLÊÍ·Å×ÊÔ´¡£
½«Ì×½Ó×ÖµÄÀàÐÍΪint¸ÄΪSOCKET¡£
»ñÈ¡¡¢ÉèÖôíÎóÂ벻ҪʹÓÃÈ«¾Ö±äÁ¿er ......
Oops¿ÉÒÔ¿´³ÉÊÇÄں˼¶µÄSegmentation Fault¡£Ó¦ÓóÌÐòÈç¹û½øÐÐÁË·Ç·¨ÄÚ´æ·ÃÎÊ»òÖ´ÐÐÁË·Ç·¨Ö¸Á»áµÃµ½SegfaultÐźţ¬Ò»°ãµÄÐÐΪÊÇcoredump£¬Ó¦ÓóÌÐòÒ²¿ÉÒÔ×Ô¼º½Ø»ñSegfaultÐźţ¬×ÔÐд¦Àí¡£Èç¹ûÄÚºË×Ô¼º·¸ÁËÕâÑùµÄ´íÎó£¬Ôò»á´ò³öOopsÐÅÏ¢¡£´¦ÀíÆ÷ʹÓõÄËùÓеØÖ·¼¸ºõ¶¼ÊÇͨ¹ýÒ»¸ö¸´ÔÓµÄÒ³± ......
²ËÄñ¾ÍÊDzËÄñ£¬Ê²Ã´ÎÊÌⶼÄÜÓöµ½°¡¡£¡£¸ÕÏëѧϰÏÂlinux ¾ÍÓöµ½ÕâÖְ׳ÕÎÊÌ⣬°Ù¶ÈÏ »¹ÊÇÓнáÂÛµÄÂ𡣺ǺÇ
ÒÔÏÂΪ²ÎÕյĽâ¾ö·½°¸£º
¿ÉÒÔÒÔµ¥Ò»Ê¹ÓÃÕßµÄģʽµÇÈ룬ȻºóÔÙ½¨Á¢Ò»¸öеÄrootÃÜÂë¡£
Òª½øÈ뵥һʹÓÃÕßģʽ£¬ÇëÏÈÖØÐÂÆð¶¯ÄúµÄµçÄÔ£¬¼ÙÈçÄúʹÓÃÔ¤µ÷µÄ¿ª¹Ø¹ÜÀí³ÌʽGRUB£¬Äú¿ÉÒÔÖ´ÐÐÏÂÁеĶ¯×÷À´½øÈ뵥һʹÓÃÕßÄ£Ê ......
ÓÃSSHµÇ½Զ³ÌµÄlinux·þÎñÆ÷»òÓÃwinä¯ÀÀÔËÐÐsambaµÄlinux·þÎñÆ÷ÖÐÓÐÖÐÎÄÃûµÄÎļþ¼ÐµÄʱºò£¬¿´µ½ÀïÃæµÄÖÐÎÄÎļþÃû¶¼ÊÇÂÒÂ룬±à¼ÎĵµµÄʱºò¶¼ÊÇ´®Ðеģ¬Ã¿´ÎÒªexport LANG=enÂé·³ËÀÁË¡£
ÉÏÍøËÄ´¦ËÑË÷£¬Çó½Ì¸ßÈË£¬µÃ´Ë°ì·¨¡£
(1) ´ò¿ª/etc/sysconfig/i18n
ÉèÖÃΪ£º
LANG="zh_CN.GB2312"
LANGUAGE="zh_CN.GB18030:zh_CN ......