linux java/jsp »ñȡϵͳµ±Ç°Ê±¼äÎÊÌâ
JSPÔ´´úÂë
<%
//»ñȡϵͳʱ¼ä
//String ddate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime());
TimeZone tz = TimeZone.getTimeZone("ETC/GMT-8");
TimeZone.setDefault(tz);
java.util.Date date = new java.util.Date();//»ñµÃϵͳʱ¼ä.
String nowTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);//½«Ê±¼ä¸ñʽת»»³É·ûºÏTimestampÒªÇóµÄ¸ñʽ.
//Timestamp goodsC_date = Timestamp.valueOf(nowTime);//°Ñʱ¼äת»»
%>
ÔÚwindowsÏÂÔËÐпÉÒÔ
µ«ÍøÒ³´«µ½linux:CentOS5.3ϳöÎÊÌâ
²î°ËСʱ£¬ºóÀ´²é×ÊÁÏ£¬
¸ÄÓÃÒÔÏ´úÂ룺
<%
//»ñȡϵͳʱ¼ä
//String ddate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime());
//TimeZone tz = TimeZone.getTimeZone("ETC/GMT-8");
TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai");
TimeZone.setDefault(tz);
java.util.Date date = new java.util.Date();//»ñµÃϵͳʱ¼ä.
String nowTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);//½«Ê±¼ä¸ñʽת»»³É·ûºÏTimestampÒªÇóµÄ¸ñʽ.
//Timestamp goodsC_date = Timestamp.valueOf(nowTime);//°Ñʱ¼äת»»
%>
¾ÍÕý³£ÁË¡£
¸ù¾Ý×ÊÁÏ£¬²é¿´
/usr/share/zoneinfo
·¢ÏÖ£¬²»ÊÇETC¶øÊÇEtc£¬¹ÊÐÞÕý´úÂ룺
<%
//»ñȡϵͳʱ¼ä
//String ddate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime());
TimeZone tz = TimeZone.getTimeZone("Etc/GMT-8");
// TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai");
TimeZone.setDefault(tz);
java.util.Date date = new java.util.Date();//
Ïà¹ØÎĵµ£º
ÔçÆÚµÄpingɨÃ蹤¾ßÐèÒªµÈ´ýÇ°Ò»¸ö±»Ì½²âÖ÷»ú·µ»ØijÖÖÏìÓ¦ÏûÏ¢Ö®ºó²ÅÄܼÌÐø̽²âÏÂһ̨Ö÷»úÊÇ·ñ´æÔÚ¡£
fpingÈ´ÄÜÒÔÂÖת·½Ê½²¢Ðеط¢³ö´óÁ¿µÄpingÇëÇó£»
sudo apt-get install fping
-a: ±íʾֻÔÚÊä³ö±¨¸æÀïÁгöµ±Ç°ÕýÔÚÔËÐеÄϵͳ¡£
-d:½âÎöÖ÷»úÃû¡£
-f£º¶ÁÈëÎļþ¡£
-g: ·¶Î§¡£
Àý×ÓÈçÏ£º
$cat a
192.168.1. ......
http://blog.chinaunix.net/u1/53053/showart_425197.html
#include <sys/types.h> /* ÌṩÀàÐÍpid_tµÄ¶¨Òå */
#include <sys/wait.h>
pid_t wait(int *status)
½ø³ÌÒ»µ©µ÷ÓÃÁËwait£¬¾ÍÁ¢¼´×èÈû×Ô¼º£¬ÓÉwait×Ô¶¯·ÖÎöÊÇ·ñµ±Ç°½ø³ÌµÄij¸ö×Ó½ø³ÌÒѾÍ˳ö£¬Èç¹ûÈÃËüÕÒµ½ÁËÕâÑùÒ»¸öÒѾ±ä³É½©Ê¬µÄ×Ó½ø³Ì£¬wai ......
Ò» ÓÅÅ̹ÒÔØ
1£º fdisk -l ÁгöÖ¸¶¨É豸µÄ·ÖÇø±íÐÅÏ¢¡£ÓÉÓÚusbÅÌÊDZ»Ä£ÄâΪscsiÉ豸·ÃÎÊ£¬ËùÒԻᱻ×Ô¶¯ÃüÃûΪsd*¡£
&nb ......
ʹÓÃWindows²Ù×÷ϵͳµÄÅóÓѶÔExcel£¨µç×Ó±í¸ñ£©Ò»¶¨²»»áÄ°Éú£¬µ«ÊÇҪʹÓÃJavaÓïÑÔÀ´²Ù×ÝExcelÎļþ²¢²»ÊÇÒ»¼þÈÝÒ×µÄÊ¡£ÔÚWebÓ¦ÓÃÈÕÒæÊ¢ÐеĽñÌ죬ͨ¹ýWebÀ´²Ù×÷ExcelÎļþµÄÐèÇóÔ½À´Ô½Ç¿ÁÒ£¬Ä¿Ç°½ÏΪÁ÷ÐеIJÙ×÷ÊÇÔÚJSP»òServlet Öд´½¨Ò»¸öCSV £¨comma separated values£©Îļþ£¬²¢½«Õâ¸öÎļþÒÔMIME£¬text/csvÀàÐÍ·µ»Ø¸øä¯ÀÀÆ ......
ʹÓÃWindows²Ù×÷ϵͳµÄÅóÓѶÔExcel£¨µç×Ó±í¸ñ£©Ò»¶¨²»»áÄ°Éú£¬µ«ÊÇҪʹÓÃJavaÓïÑÔÀ´²Ù×ÝExcelÎļþ²¢²»ÊÇÒ»¼þÈÝÒ×µÄÊ¡£ÔÚWebÓ¦ÓÃÈÕÒæÊ¢ÐеĽñÌ죬ͨ¹ýWebÀ´²Ù×÷ExcelÎļþµÄÐèÇóÔ½À´Ô½Ç¿ÁÒ£¬Ä¿Ç°½ÏΪÁ÷ÐеIJÙ×÷ÊÇÔÚJSP»òServlet Öд´½¨Ò»¸öCSV £¨comma separated values£©Îļþ£¬²¢½«Õâ¸öÎļþÒÔMIME£¬text/csvÀàÐÍ·µ»Ø¸øä¯ÀÀÆ ......