example: ./netspeed eth0 1 #!/bin/bash 2 3 INTERVAL="1" # update interval in seconds 4 5 if [ -z "$1" ]; then 6 echo 7 echo usage: $0 [network-inter.....
分类:
系统相关 时间:
2014-11-04 10:58:29
阅读次数:
197
http://linuxtoy.org/archives/bash-shortcuts.html生活在 Bash shell 中,熟记以下快捷键,将极大的提高你的命令行操作效率。编辑命令Ctrl + a :移到命令行首Ctrl + e :移到命令行尾Ctrl + f :按字符前移(右向)Ctrl +...
分类:
其他好文 时间:
2014-11-04 10:48:06
阅读次数:
140
即插即用支持ntfs下载:http://pan.baidu.com/s/1bn0DZEB$tarntfs-3g_ntfsprogs-2014.2.15.tgz
$cdntfs-3g_ntfsprogs
$su
#./configure
#make
#makeinstall即插即用方法:新增文件#vi/sbin/mount.ntfs内容如下:#!/bin/bash
exportLANG=en_US.UTF-8
exec/sbin/mount.ntfs-3g"$@..
分类:
移动开发 时间:
2014-11-04 09:30:01
阅读次数:
175
折腾了好久,最后在git bash 上输入 git gui启动gui
打开Git GUI,帮助->Show SSH key,点击generate key
生成后在加入,成功。
之前就是:
有人说要这样使用
ssh-agent
ssh-add ~/.ssh/id_key
我的无效
新生成的key不能加入 ssh 就会导致 连接不上 github
ssh -T...
一、for循环[root@wwwshell]#catfor.sh#!/bin/bashforiin`seq110`;do echo"$i" done通过这个脚本就可以看到for循环的基本结构:for变量名in循环的条件;do
command
done[root@wwwshell]#shfor.sh12345678910例2:[root@wwwshell]#catfor2.sh#!/bin/bashforain`ls`;do echo"$a"do..
分类:
系统相关 时间:
2014-11-04 09:27:51
阅读次数:
231
dhcp_install.sh#!/bin/bash#安装yum源#配置#启动#mount-oloop/dev/cdrom/mnt#echo"mount-oloop/dev/cdrom/mnt">>/etc/rc.localcat>/etc/yum.repos.d/dvd.repo<<ENDF[autoyum]baseurl=file:///mntgpgcheck=0ENDFyumcleanall&ÿistall&>/dev/n..
分类:
其他好文 时间:
2014-11-04 06:55:54
阅读次数:
197
特殊变量列表
变量
含义
$0
当前脚本的文件名
$n
传递给脚本或函数的参数。n 是一个数字,表示第几个参数。例如,第一个参数是$1,第二个参数是$2。
$#
传递给脚本或函数的参数个数。
$*
传递给脚本或函数的所有参数。
$@
...
分类:
系统相关 时间:
2014-11-03 22:40:49
阅读次数:
218
Q:我如何在一句do shell script里使用多条指令?比如我想要先cd到某目录,然后在该目录里做一些操作,但是分次调用do shell script不会记住上次的工作路径。A:每次对do shell script的调用都是一个新的进程,所以前一次调用里改变的路径无法对下一次调用生效。想要在一...
分类:
移动开发 时间:
2014-11-03 22:28:36
阅读次数:
219
代码统计code如下:xargs说明:xargs 读入stdin的值, 并默认以空白或者回车作为分隔符,将分割的值作为参数传给后面紧接着的的命令行操作。-d --delim : 指定分隔符;-a : 从文件中读入数据;wc说明:统计指定文件中的字符数,字节数,行数用法格式: wc [options]...
分类:
系统相关 时间:
2014-11-03 20:56:21
阅读次数:
339
在shell下直接敲 sqlite3 进入sqlite命令行模式下(CLP的shell模式,CLP是sqlite3的命令行程序)sqlite3 -help (注意有空格)显示命令行模式下,sqlite3中的用法sqlite3 test.db 建立或打开名为test.db的数据...
分类:
数据库 时间:
2014-11-03 19:23:42
阅读次数:
365