LinuxµÄDateºÍTime
ÖÜÐ÷ºê
http://zxuhong.blog.51cto.com/368977/74442
1.1 ¸ÅÊö
ÊÀ½ç±ê׼ʱ¼ä£¨Coordinated Universal Time£¬UTC£©£¬Ò²¾ÍÊÇ´ó¼ÒËùÊìÖªµÄ¸ñÁÖÍþÖαê׼ʱ ¼ä£¨Greenwich Mean Time£¬GMT£©¡£ÊÀ½ç¸÷µØʱ¼äÒ²ÊÀ½ç±ê׼ʱ¼äΪ»ù×¼»®·ÖΪ²»Í¬µÄʱÇø£¬ÀýÈ磬ÖйúµÄ±±¾©Ê±¼äÓëUTCµÄʱ²îΪ+8£¬Ò²¾ÍÊÇUTC+8¡£ÃÀ¹úÊÇUTC-5¡£
Calendar Time£ºÈÕÀúʱ¼ä£¬ÊÇÓÓ´ÓÒ»¸ö±ê׼ʱ¼äµãµ½´ËʱµÄʱ¼ä¾¹ýµÄÃëÊý”À´±íʾµÄʱ¼ä¡£ÎÞÂÛÄÄÒ»¸öʱÇø£¬ÔÚͬһʱ¿Ì¶Ôͬһ¸ö±ê׼ʱ¼äµãÀ´Ëµ£¬ÈÕÀúʱ¼ä¶¼ÊÇÒ»ÑùµÄ¡£ÈÕÀúʱ¼ä ·µ»Ø×Ô1970-1-1:00:00:00ÒÔÀ´Ëù¾¹ýµÄÃëÊýÀÛ¼Æ Öµ¡£
¸úÈÕÆÚʱ¼äÏà¹ØµÄshellÃüÁî
$ date // ÏÔʾµ±Ç°ÈÕÆÚ
$ time // ÏÔʾ³ÌÐòÔËÐеÄʱ¼ä
$ hwclock // ÏÔʾÓëÉ趨Ӳ¼þʱÖÓ
$ clock // ÏÔʾÓëÉ趨Ӳ¼þʱÖÓ£¬ÊÇhwclockµÄÁ´½ÓÎļþ
$ cal // ÏÔʾÈÕÀú
£¨1£©date ÏÔʾ»òÉèÖõ±Ç°ÈÕÆÚʱ¼ä
$ date ÏÔʾµ±Ç°ÈÕÆÚʱ¼ä -- Öйú±±¾©Ê±¼ä CST China Standard Time UTC+8:00
2008Äê 05ÔÂ 01ÈÕ ÐÇÆÚËÄ 04:28:27 CST
$ date –u ÏÔʾµ±Ç°ÈÕÆÚʱ¼ä -- ÊÀ½ç±ê׼ʱ¼ä UTC
2008Äê 04ÔÂ 30ÈÕ ÐÇÆÚÈý 20:29:23 UTC
ÒÔÉÏÁ½¸öʱ¼äÏà±ÈÓÐ8¸öСʱµÄʱ²î
$ date –R ÏÔʾµ±Ç°ÈÕÆÚʱ¼ä – RFC¸ñʽ
Thu, 01 May 2008 04:30:25 +0800
$ date -s 20080501 ÉèÖÃÈÕÆÚ
$ date -s 20:40:30 ÉèÖÃʱ¼ä
£¨2£©time ÏÔʾ³ÌÐòÔËÐÐʱÏûºÄµÄʵ¼Êʱ¼ä£¬Óà »§C
Ïà¹ØÎĵµ£º
ÎÒÕâÀï˵µÄioctlº¯ÊýÊÇÔÚÇý¶¯³ÌÐòÀïµÄ£¬ÒòΪÎÒ²»ÖªµÀ»¹ÓÐûÓбðµÄ³¡ºÏÓõ½ÁËioctl£¬ ËùÒԾ͹涨ÁËÎÒÃÇÌÖÂ۵ķ¶Î§¡£ÎªÊ²Ã´ÒªÐ´ÆªÎÄÕÂÄØ£¬ÊÇÒòΪÎÒÇ°Ò»Õó×Ó±»ioctl¸ø¸ã»ìÁË£¬Õ⼸Ìì²ÅŪÃ÷°×Ëü£¬ÓÚÊÇÔÚÕâÀïÇåÀíÒ»ÏÂÍ·ÄÔ¡£
Ò»¡¢ ʲôÊÇioctl¡£
ioctlÊÇÉ豸Çý¶¯³ÌÐòÖжÔÉ豸µÄI/OͨµÀ½øÐйÜÀíµÄº¯Êý¡£Ëùν¶ÔI/OͨµÀ½øÐÐ ......
bashrcÓëprofileµÄÇø±ð
Òª¸ãÇåbashrcÓëprofileµÄÇø±ð£¬Ê×ÏÈҪŪÃ÷°×ʲôÊǽ»»¥Ê½shellºÍ·Ç½»»¥Ê½shell£¬Ê²Ã´ÊÇlogin shell ºÍnon-login shell¡£
½»»¥Ê½Ä£Ê½¾ÍÊÇshellµÈ´ýÄãµÄÊäÈ룬²¢ÇÒÖ´ÐÐÄãÌá½»µÄÃüÁî¡£ÕâÖÖģʽ±»³Æ×÷½»»¥Ê½ÊÇÒòΪshellÓëÓû§½øÐн»»¥¡£ÕâÖÖģʽҲÊÇ´ó¶àÊýÓû§·Ç³£ÊìϤµÄ£ºµÇ¼¡¢Ö´ÐÐһЩÃüÁǩÍË¡ ......
linux coredumpÅäÖÃÓëµ÷ÊÔ
À´Ô´:
ChinaUnix²©¿Í ¡¡ÈÕÆÚ£º
2009.02.09 17:11¡¡(¹²ÓÐ0
ÌõÆÀÂÛ) ÎÒÒªÆÀÂÛ
linux coredumpÅäÖÃÓëµ÷ÊÔ
&nb ......
1¡¢°²×°°ü£º
ÏÂÔØÍøÖ·£ºhttp://dev.sun.com.cn/glassfish/index_zh.html
glassfish-installer-v2.1-b60e-linux-ml.jar£¨°æ±¾£º2.1£©
2¡¢½âѹGlassFishÈí¼þ°ü²¢×Ô¶¯´´½¨Ò»¸öеÄÎļþ¼Ð½Ð“glassfish”
java -Xmx256m -jar glassfish-installer-v2.1-b60e-linux-ml.jar
»Ø¸´A
mv glassfish /usr/local/
3¡¢É ......
ÎÒÃÇÔÚLinuxÏ°²×°ÏµÍ³Èí¼þµÄʱºò,¾³£Óöµ½Ò»Ð©ÏµÍ³»·¾³±äÁ¿ÅäÖõÄÎÊÌ⡣ʲôÊÇ»·¾³±äÁ¿£¿ÈçºÎ¶¨ÖÆ»·¾³±äÁ¿£¿ÎÒ½«ÔÚÏÂÃæ×öһЩ½éÉÜ¡£
Ò»¡¢ ʲôÊÇ»·¾³±äÁ¿£¿
LinuxÊÇÒ»¸ö¶àÓû§µÄ²Ù×÷ϵͳ¡£¶àÓû§Òâζ×Åÿ¸öÓû§µÇ¼ϵͳºó£¬¶¼ÓÐ×Ô¼º×¨ÓõÄÔËÐл·¾³¡£¶øÕâ¸ö»·¾³ÊÇÓÉÒ»×é±äÁ¿Ëù¶¨Òå, Õâ×é±äÁ¿±»³ÆΪ»·¾³±äÁ¿¡£Óû§ ......