2008年12月6日星期六
2008年12月5日星期五
2008年12月4日星期四
2008年12月3日星期三
blogger daily 12/03/2008
Posted from Diigo. The rest of my favorite links are here.
2008年12月2日星期二
blogger daily 12/02/2008
- C-a 行首,C-e 行尾
Matrix67: My Blog » Blog Archive » 趣题:用正则表达式判断一个二进制数是否能被3整除
- 判断一个数的整除性能轻易地用有限状态自动机实现,而有限状态自动机又可以翻译成正则表达式。
- C-c C-t
- MBR,也就是主引导纪录
Posted from Diigo. The rest of my favorite links are here.
2008年12月1日星期一
使用jps查看java进程ID
在Linux上经常需要查看Java的进程ID,例如想kill掉某个Java进程就需要pid。使用ps + grep可能觉得不是很方便,如果classpath很长,输出会非常难看。
其实从JDK1.5开始,Sun就提供了一个非常方便的Java进程查看工具:jps 。 配合适当的参数,输出一目了然。例如,我经常使用jps -lv,
-l
Output the full package name for the application's main class or the full path name to the application's JAR file.
-v
Output the arguments passed to the JVM.
更多的参数可以查看jdk的文档http://java.sun.com/javase/6/docs/technotes/tools/share/jps.html
JDK提供这个工具是为了和其他的Troubleshooting工具配合使用,例如jmap、jstack,这些工具也很有意思,有兴趣的可以尝试用用http://java.sun.com/javase/6/docs/technotes/tools/index.html#troubleshoot。
其实从JDK1.5开始,Sun就提供了一个非常方便的Java进程查看工具:jps 。 配合适当的参数,输出一目了然。例如,我经常使用jps -lv,
-l
Output the full package name for the application's main class or the full path name to the application's JAR file.
-v
Output the arguments passed to the JVM.
更多的参数可以查看jdk的文档http://java.sun.com/javase/6/docs/technotes/tools/share/jps.html
JDK提供这个工具是为了和其他的Troubleshooting工具配合使用,例如jmap、jstack,这些工具也很有意思,有兴趣的可以尝试用用http://java.sun.com/javase/6/docs/technotes/tools/index.html#troubleshoot。
订阅:
博文 (Atom)