下面是我平常用的一些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
Popularity: 1% [?]
标签:Bash07月 4th, 2008 xiao H Posted in shell, 系统管理 No Comments »
05月 13th, 2008 xiao H Posted in shell, 精品文档 No Comments »
作者:zleil
################################################################
#[0]: 基础 #
################################################################
**sed执行过程:
a. 如果已到达文件尾,goto e;否则,用当前行内容替换模式空间的内容(即缓冲区,还有一个缓冲区:后备空间);
b. 执行命令序列,命令只对模式空间有效;
c. 当前行号加1
d. goto a;
e. 退出
注: 当前行号可由命令N或n更改,当前行号最初为第1行
执行命令时,如果该命令有地址前缀,那么看*当前行号*是否与地址前缀相符,相符则执行,否则不执行
Read the rest of this entry »
Popularity: 14% [?]
标签:sed05月 5th, 2008 xiao H Posted in shell No Comments »
05月 5th, 2008 xiao H Posted in shell, 精品文档 No Comments »
03月 8th, 2008 xiao H Posted in shell 1 Comment »
03月 8th, 2008 xiao H Posted in shell, 精品文档 No Comments »
或许,许多人都已经听过 shell 或 bash 这些名字,但不知道您是否知道它们究竟是什么东东呢?
先回到电脑基础常识上吧:所有的电脑都是由硬体和软体构成的,硬体就是大家能摸得着看得见的部份,例如:键盘、荧幕、CPU、记忆体、硬碟、等等。离开了硬体,所谓的电脑是不存在的,因为整个系统的输入和输出以及运算都离不开硬体。请问:如果没有键盘和荧幕您是怎样使用电脑的?但是,您透过键盘进行的输入,以及从荧幕看到的输出,真正发挥功能的,是软体的功劳。而直接负责和这些硬体进行沟通的软体,就是所谓的核心(kernel),kernel 必须能够接管键盘的输 Read the rest of this entry »
Popularity: 13% [?]
该日志未加标签03月 7th, 2008 xiao H Posted in shell No Comments »
03月 4th, 2008 xiao H Posted in shell No Comments »
df [options][name]
$ df -h 以友好的格式输出所有已安装文件系统的磁盘容量状态
$ df -m /home 以M为单位输出home目录的磁盘容量状态
$ df -k 以K为单位输出所有已安装文件系统的磁盘容量状态 Read the rest of this entry »
Popularity: 9% [?]
标签:df, hdparm