博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  linux

摘要:mv /etc/apt/sources.list /etc/apt/sources.list.bakwget http://mirrors.163.com/.help/sources.list.oneiricmv sources.list.oneiric /etc/apt/sources.listapt-get updateReference: http://mirrors.163.com/.help/ubuntu.html 阅读全文

posted @ 2012-04-21 15:56 algorithmer 阅读(193) 评论(0) 推荐(0)

摘要:在CentOS上,Makefile中动态链接库的位置放在源码文件名的前面和后面都可以,而在ubuntu中LIBS必须放到源文件名的后面,否则会碰到下面的问题:I am currently using gcc to compile and I need to use<math.h>. Problem is that it won't recognize the library. I have also tried-lmand nothing. The function I tried to use wasceil()and I get the following error: 阅读全文

posted @ 2012-04-21 15:53 algorithmer 阅读(1579) 评论(0) 推荐(0)

摘要:sudo apt-get install openssh-server/etc/init.d/ssh start 阅读全文

posted @ 2012-04-21 15:51 algorithmer 阅读(117) 评论(0) 推荐(0)

摘要:介绍:NAMExentrace - capture Xen trace buffer dataSYNOPSISxentrace[OPTIONS] [FILE]DESCRIPTIONxentraceis used to capture trace buffer data from Xen. The data is output in the following binary format (host endian): CPU(uint)TSC(u64)EVENT(u32)D1D2D3D4D5(allu32)Where CPU is the processor number, TSC is the 阅读全文

posted @ 2012-01-17 18:21 algorithmer 阅读(444) 评论(0) 推荐(0)

摘要:使用:1.初始化假设你的源代码目录为proj,执行以下步骤可以建立初始的repository$ cd proj$ hg init //生成repository$ hg add /fullpath/filename //加入文件或者$ hg addremove //加入可识别的文件,去除其他文件$ hg commit //生成你的代码的第一个版本执行此命令会让hg调用vi,这时你可以键入一些关于当前提交内容的一些信息,然后保存退出,这个版本就行程了。2.版本以后每当你改动文件后都可以使用hg commit命令来生成一个新的版本$ hg parent //查看当前的版本$ hg log //查看所 阅读全文

posted @ 2012-01-17 18:01 algorithmer 阅读(3686) 评论(0) 推荐(0)

摘要:需要设置 “set print element 0”(gdb) p rPtr.xmlBuf$1 = 0xa570e20 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Reservations>\n\t<Reservation name=\"2c91897d-33822121-0133-83dd6f3a-013a\">\n\t\t<Consumer name=\"/2c91897d-33822121-0133-823303a4-0 阅读全文

posted @ 2012-01-15 20:12 algorithmer 阅读(285) 评论(0) 推荐(0)

摘要:得到进程的pid:ps -ef | grep process_name | grep -v "grep" | awk '{print $2}'查看进程的所有线程# ps mp 6648 -o THREAD,tidUSER %CPU PRI SCNT WCHAN USER SYSTEM TIDroot 0.0 - - - - - -root 0.0 24 - - - - 6648root 0.0 21 - - - - 6650root 1.0 24 - - - - 14214root 0.0 23 - fu... 阅读全文

posted @ 2012-01-13 10:40 algorithmer 阅读(13671) 评论(0) 推荐(0)

摘要: 阅读全文

posted @ 2012-01-12 23:07 algorithmer 阅读(152) 评论(0) 推荐(0)

摘要:首先介绍一下diff和patch。在这里不会把man在线文档上所有的选项都介绍一下,那样也没有必要。在99%的时间里,我们只会用到几个选项。所以必须学会这几个选项。1、diff--------------------NAMEdiff - find differences between two filesSYNOPSISdiff [options] from-file to-file--------------------简单的说,diff的功能就是用来比较两个文件的不同,然后记录下来,也就是所谓的diff补丁。语法格式:diff【选项】源文件(夹)目的文件(夹),就是要给源文件(夹)打个补丁 阅读全文

posted @ 2012-01-12 22:50 algorithmer 阅读(145) 评论(0) 推荐(0)

摘要: 阅读全文

posted @ 2012-01-12 21:59 algorithmer 阅读(142) 评论(0) 推荐(0)