Archive for 七月, 2008

free vpn

星期四, 七月 10th, 2008 Posted in 日常桌面 | No Comments »

VPN提供商:千渡
地点:中国
带宽:256KB/s
用户名:zlnic.net
密码:zhichiaoyun
VPN服务器IP:电信区:244server1.1000du.net网通区:244server2.1000du.net铁通\移动\联通\教育网服务器:244server3.1000du.net
注册地址:http://bbs.1000du.net
备注:共用用户名和密码,每个星期会更换密码,大家可以收藏此页,我同步更新。
最后更新:20080707

标签:,

Gentoo Linux 2008.0 released

星期一, 七月 7th, 2008 Posted in 新闻评论 | No Comments »

Gentoo Linux 2008.0 released
Posted on July 6, 2008 by Donnie Berkholz
tux

The 2008.0 final release is out! Code-named “It’s got what plants crave,” this release contains numerous new features including an updated installer, improved hardware support, a complete rework of profiles, and a move to Xfce instead of GNOME on the LiveCD. LiveDVDs are not available for x86 or amd64, although they may become available in the future. The 2008.0 release also includes updated versions of many packages already available in your ebuild tree.

标签:

我常用的小shell

星期五, 七月 4th, 2008 Posted in shell, 系统管理 | No Comments »

下面是我平常用的一些bash shell 组合,方便我的日常管理。
清除所有arp 缓存

arp -n|awk '/^[1-9]/ {print "arp -d "$1}'|sh

显示打开连接数前10个机子的IP 和连接数

cat /proc/net/ip_conntrack | cut -d ' ' -f 10 | cut -d '=' -f 2 | sort | uniq -c | sort -nr | head -n 10

绑定已知机子的arp 地址

cat /proc/net/arp | awk '{print $1 " " $4}' |sort -t. -n +3 -4 > /etc/ethers

批量重命名

ls dirname | awk '{printf"mv %s file_%06d\n",$0,i++}' | sh

Per脚本实现eth0挂起后自动重启

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl -w
 
$fail_count = 0;
$cmd_result = '';
 
$cmd_result = `ping -w 4 61.130.107.193 |grep packet`;
 
if ($cmd_result =~ /100% packet loss/) {
$fail_count++;
if ($fail_count > 5) {
`ifdown eth0`;
`ifup eth0`;
} else {
$fail_count = 0;
}
}

自动从apnic记录中分离出网通,电信IP 段

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
FILE=/root/ip.txt
rm -f $FILE
wget http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest -O $FILE
grep 'apnic|CN|ipv4|' $FILE | cut -f 4,5 -d'|'|sed -e 's/|/ /g' | while read ip cnt
do
echo $ip:$cnt
mask=$(cat < < EOF | bc | tail -1
pow=32;
define log2(x) {
if (x<=1) return (pow);
pow--;
return(log2(x/2));
}
log2($cnt)
EOF)
echo $ip/$mask>> cn.net
NETNAME=`whois $ip@whois.apnic.net | sed -e '/./{H;$!d;}' -e 'x;/netnum/!d' |grep ^netname | sed -e 's/.*:      \(.*\)/\1/g' | sed -e 's/-.*//g'`
case $NETNAME in
CNC)
echo $ip/$mask >> CNCGROUP
;;
CHINANET|CNCGROUP)
echo $ip/$mask >> $NETNAME
;;
CHINANET|CNCGROUP)
echo $ip/$mask >> $NETNAME
;;
CHINATELECOM)
echo $ip/$mask >> CHINANET
;;
*)
echo $ip/$mask >> OTHER
;;
esac
done

去掉文件中的注释和空格

cat filename grep -v '^$' | grep -v '^#' > newfile

标签:

ubuntu 8.04 wine qq2008

星期三, 七月 2nd, 2008 Posted in 日常桌面 | 4 Comments »

网吧的ubuntu 机子终于不能用eva 登录QQ 了,而pidgin的群一直支持不好,不能去BT吧调戏MM 的日子真无聊。
今天实在受不了了,决定用wine 装qq 2008 去BT。

虽然ubuntu官方源里也有wine,但版本不是最新的,所以我用了winehq,具体操作如下。

# sudo su
# wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- |apt-key add -
# wget http://wine.budgetdedicated.com/apt/sources.list.d/hardy.list -O /etc/apt/sources.list.d/winehq.lis
# apt-get update
# apt-get install wine

标签:,

Fedora9 开启3d 桌面

星期三, 七月 2nd, 2008 Posted in 日常桌面 | No Comments »

上周yum update 系统发现,livna 的nvidia 驱动更新了,已经解决了矢量字体的渲染问题,我也终于可以正常的用nvidia驱动了。既然可以正常使用驱动了,自然要把3d 桌面开起来。

安装

# su
# yum install compiz compiz-fusion-gnome compiz-fusion-extras-gnome fusion-icon-gtk ccsm

标签:, ,


Page 2 of 212