摘要: Linux自带了ntp服务 -- /etc/init.d/ntpd,这个服务不仅可以设置让本机和某台/某些机器做时间同步,他本身还可以扮演一个time server的角色,让其他机器和他同步时间。配置文件就是/etc/ntp.conf。为了测试,在公司设置让sales -- 192.168.0.3和router -- 192.168.0.1做时间同步。router做time server,router本身不和其他机器时间同步,就是取本地时间。所以,我先把router机器的时间调准了:date "2008-05-15 cst"date "09:59"clock -whwclock --systo 阅读全文
posted @ 2010-12-11 13:55 super119 阅读(1734) 评论(0) 推荐(0) 编辑
摘要: man默认使用的是less来做为文字显示程序。我们可以使用most来代替less,从而实现彩色的man手册。pacman -S most然后修改/etc/man.conf,将PAGER和BROWSER都改成/usr/bin/most -s即可。不过most的快捷键设置和less不太一样,最主要的是往下一行和往上一行,以前用j, k两个键习惯了,所以,vi ~/.mostrc,添加:setkey down "j"setkey up "k"这样就可以了,在most中,输入h就会出现help内容,里面有most的快捷键设置,有些相比less还是不错的,比如搜索支持命令f,查找下一个用命令n即可。搜索 阅读全文
posted @ 2010-12-11 13:52 super119 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 1. 这块网卡使用的是Atheros Communications Inc. AR2413的芯片组,可以使用madwifi的驱动(www.madwifi-project.org)。现在的Linux内核默认就带有madwifi的驱动,名为ath5k,但是这个驱动对于配置该网卡为AP有问题,所以我们还是换成ath_pci这个驱动,这也是madwifi project中的驱动。2. 所以,首先pacman -S madwifi madwifi-utils wireless_tools,然后morprobe -r ath5k并将ath5k在/etc/rc.conf中ban掉(在MODULES一项中用! 阅读全文
posted @ 2010-12-11 13:49 super119 阅读(728) 评论(0) 推荐(0) 编辑
摘要: 非常简单,用cat将多个分卷文件合成一个然后解压即可,比如:cat xxx* xxx.zipunzip xxx.zip 阅读全文
posted @ 2010-12-11 13:47 super119 阅读(1470) 评论(0) 推荐(0) 编辑
摘要: 很简单,进入kernel source目录:head -n 5 Makefile就会有类似这样的输出:VERSION = 2PATCHLEVEL = 6SUBLEVEL = 24EXTRAVERSION = .7NAME = Err Metey! A Heury Beelge-a Ret!这个版本就是 2.6.24.7了。 阅读全文
posted @ 2010-12-11 13:46 super119 阅读(1025) 评论(0) 推荐(0) 编辑
摘要: [代码]可以将这个代码中的线程优先级改成HIGH或URGENT,然后生成两个可执行程序,运行会发现两个程序运行的时间差不多,将系统CPU占用调高,再测试也是一样。或者写一个脚本,同时运行两个程序,也是一样。这说明现在在pthread中设定线程的priority已经没有效果了。查阅了资料知道,这是因为现在linux默认的调度策略是CFS,完全公平的调度策略,完全根据每个进程消耗的cpu时间来决定下次由哪个进程被调度。如果要改变这种调度策略,那可以使用linux提供的FIFO或RR(round robin)这种类型的策略,这种类型对应到kernel中,是名为realtime的策略,具体在内核sch 阅读全文
posted @ 2010-12-11 13:45 super119 阅读(667) 评论(0) 推荐(0) 编辑
摘要: Howto exclude file/directory when untar a archiveAdd --exclude pattern at the END of the command line.E.g:tar jxvf tar file path --exclude "src/linux"This makes all file/directory which their path includes "src/linux" will not be untared. 阅读全文
posted @ 2010-12-11 12:29 super119 阅读(335) 评论(0) 推荐(0) 编辑
摘要: rtorrent的确非常好用,下载机使用了Ubuntu 9.10, openssh-server, rtorrent 0.8.6/libtorrent 0.12.0, DDNS, samba就OK了。基本上rtorrent的编译非常简单,下载libtorrent和rtorrent(Ubuntu 9.10中的rtorrent版本太老,有一些配置没法支持,所以自己编译最新版本),然后就是configure --prefix=/usr, make, sudo make install。中途缺什么就apt-get什么就行了。注意rtorrent是用C++写的,所以要sudo apt-get insta 阅读全文
posted @ 2010-12-11 12:28 super119 阅读(2188) 评论(0) 推荐(0) 编辑
摘要: By SSH, Command line:rsync -av --force --delete --exclude 1.AonA/beagledroid_src.tar.gz --exclude 4.GTK+/ReferenceManual/ --exclude G.OMAP_CSSD_Maintain/toolchain/arm-2007q3/ -e ssh super@192.168.0.100:/home/super/Access/ /home/super/Access/1. 192.168.0.100 needs openssh-server because, we operate o 阅读全文
posted @ 2010-12-11 12:23 super119 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2010-12-11 12:22 super119 阅读(406) 评论(0) 推荐(0) 编辑