sudo bash :change the current user into rootsu u1:change the current user into u1useradd: add new user into systemuserdel: delete a user from systemgr...
分类:
其他好文 时间:
2014-10-27 22:59:09
阅读次数:
221
#!/bin/bashwhile [ 1 -eq 1 ] #一直循环doping 192.168.1.116 -c 1|grep -q "time=" #ping通有time= $?=0 不同$?=1if [ $? -eq 0 ]thenecho "tong 0" elseecho " ...
分类:
其他好文 时间:
2014-10-27 20:56:58
阅读次数:
188
一:介绍puppet用于集中管理多台服务器的file、package、server、cron、user、group、exec(执行shell命令)、yumrepo等常用资源的C/S结构软件二:puppet工作流程puppet客户端通过facter收集客户端信息(主机名、内存、IP地址、系统信息……)并发送给服务端服务器端检测到客户..
分类:
其他好文 时间:
2014-10-27 19:50:19
阅读次数:
199
一、条件测试结构1.if/then结构用来判断命令列表的退出状态码是否为0if[COMMAND]
then
COMMAND
else
COMMAND
fi2.if命令能够测试任何命令,并不仅仅是中括号中的条件,比如ifgrep-qBashfile
then
echo"FilecontainsatleastoneoccurrenceofBash."
fi3.一个if/then结构可以包含嵌..
分类:
其他好文 时间:
2014-10-27 19:45:05
阅读次数:
253
redhat6.4x64和x86更新bashx64安装下载bashbash-4.1.2-15.el6_5.2.x86_64.rpmhttp://mirror.centos.org/centos/6/updates/x86_64/Packages/bash-4.1.2-15.el6_5.2.x86_64.rpm安装新包bashchmodu+xbash-4.1.2-15.el6_5.2*rpm-Uvhbash-4.1.2-15.el6_5.2.x86_64.rpmi86安装下载bas..
分类:
其他好文 时间:
2014-10-27 19:43:48
阅读次数:
232
简介:
从之前的博文中我们提到过,关机流程中最后是通过修改Android属性进行关机操作(SystemProperties.java通过JNI调用访问系统属性),当然我们也可以通过adb命令修改Android系统属性执行关机操作,例如adb shell setpro sys.powerctl shutdown,这里我们简单介绍下修改Android属性关机的原理或流程。
这是Sy...
分类:
移动开发 时间:
2014-10-27 19:34:35
阅读次数:
284
一、条件语句简单条件if [ condition ]; then # 当 condition 成立时,执行内容;fi # 将 if 反过来写,fi 结束 if 之意复杂条件if [ condition ]; then # 当 condition 成立时,执行内容;else # 当...
分类:
系统相关 时间:
2014-10-27 19:25:49
阅读次数:
257
作者:iamlaosong
我们经常在shell脚本程序中用
sqlplus emssxjk/emssxjk <<EOF
select count(*) from sncn_yxyj where create_date like sysdate;
EOF
其中的SQL语句相当于在sqlplus程序环境中输入的,这样输入的内容夹在两个EOF之间,可长可短,EOF也可以换成其他任意的字...
分类:
系统相关 时间:
2014-10-27 17:43:33
阅读次数:
384
退出状态bash中的内建命令虽然不创建新的进程,但也会有Exit Status,通常也用0表示成功非零表示失败,虽然内建命令不创建新的进程,但执行结束后也会有一个状态码,也可以用特殊变量$?读出命令代换:`或$()user@ae01:~$ echo `date`Sat Oct 25 19:17:58...
分类:
系统相关 时间:
2014-10-27 17:15:25
阅读次数:
263
以下命令都是在mysql客户端执行,不是shell的bin环境查看mysql当前连接数show processlist;查看服务器环境变量show variables;show global variables; show session variables;show local variables...
分类:
数据库 时间:
2014-10-27 14:02:44
阅读次数:
177