2008-06-25

batch kill linux porcesses

关键字: linux kill
ps -ef | grep 'expect -f' | awk '{system("kill -9 " $2)}'
2008-06-25

an expect script for ssh login

关键字: linux expect ssh
#!/usr/bin/expect -f # This script needs three argument to(s) connect to remote server: # user = Username of remote UNIX Server # password = Password of remote UNIX server # ipaddr = IP Addreess of remote UNIX server, no hostname # For example: # ./sshlogin.exp 192.168.1.11 user password ssh ...
2008-06-24

用linux命令行实现批量文件编码转换

关键字: linux encode iconv
本操作有风险,请注意操作前备份文件。 1.将原来所有编码为gb2312的*.java文件转换为编码为utf-8的*.java.new文件 for i in `find . -name "*.java"`; do iconv -f gb2312 -t utf-8 $i -o $i.new; done 2.将*.java.new文件的.new扩展名去除 find . -name "*.new" | sed 's/\(.*\).new$/mv "&" "\1"/' | sh
2008-03-29

如何解开一个.deb文件

关键字: extract_deb deb
使用ar命令解开.deb包 ar vx test.deb 解开之后会得到三个文件 debian-binary control.tar.gz data.tar.gz 使用 tar 解开 data.tar.gz 即可得到deb文件中的数据文件 tar -xzvf data.tar.gz
查找当前目录下的所有*.doc文件并将所有结果复制到 /tmp/doc 目录下 find . -iname "*.doc" -type f -exec cp {} /tmp/doc \; 查找当前目录下的所有*.doc目录并将所有结果复制到 /tmp/doc 目录下 find . -iname "*.doc" -type d -exec cp {} /tmp/doc \;
2008-03-06

集群部署方案

关键字: cluster, 集群
集群部署方案一 目标1 均衡系统压力,减少单个服务器因压力过于集成而超负荷运转的发生几率。2 加快用户的访问的速度。3 自动备援,避免因单点故障而导致整个系统瘫痪的情况发生。4 日后系统的便于扩展,通过增加相应的服务器节点即可提高整个系统的承载能力。二 软件配置系统 :RHEL4 [ Linux version 2.6.9-42.EL]负载均衡 :ipvsadm(1.24-6)缓存服务器 :squid(3.0)应用服务器( ...
2007-12-24

Ubuntu 7.10 SSH登录超级慢的解决办法

关键字: ubuntu linux ssh
编辑 /etc/ssh/ssh_config 文件,将 GSSAPIAuthentication yes 改成 GSSAPIAuthentication no 即可。 原因: The default ssh_config file comes with GSSAPIAuthentication set to "yes". This causes a DNS query in an attempt to resolve _kerberos.<hostname> whenever ssh is invoked. During periods when connectivity to t ...
pickerel
搜索本博客
最近加入圈子
存档
最新评论