[root@snlinux1~]#vimwlan.sh
#!/bin/bash
#pingcheckscripts
forIPin192.168.9.{1..254}
do
ping-c2-i0.1-W1$IP&>/dev/null
if[$?-eq0]
then
echo"Host$IPisup."
else
echo"Host$IPisdown."
fi
done
探测局域网内存活主机:192.168.9.0网段
分类:
其他好文 时间:
2014-09-05 16:26:31
阅读次数:
235
#!/bin/bash
###--------------Programtheme-------------######
#
#本Shell,是为了实现普通用户可以修改用户账户密码更改、锁定、解锁,制定的脚步。
while:
do
clear
cat<<xue
===============================================
/ Y2c015 useradministration \| 1..
分类:
其他好文 时间:
2014-09-05 16:26:22
阅读次数:
173
A语言-->C++-->C-->ruby on rails-->bash等-->C-->C++-->Java-->HTML/CSS/js==》Java 银行业务中的交易查询-->汽车导航的地图数据维护-->IPPBX的嵌入式应用部分-->虚拟机文件的构建系统(带网站)-->国产云计算产品的...
分类:
其他好文 时间:
2014-09-05 15:47:31
阅读次数:
162
#!/bin/bash
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oraInventory
chown -R oracle:oinstall /u01
chmod -R 775 /u01
mkdir -p /u01/app/grid
chown -R grid:oinstall /u01/app/grid
chmod -R 775 /u01/...
分类:
其他好文 时间:
2014-09-04 23:47:20
阅读次数:
498
#!/bin/bash
service iptables stop
chkconfig iptables off
sed -i ‘/SELINUX=enforcing/s/^/#/‘ /etc/selinux/config
sed -i ‘/#SELINUX=enforcing/a SELinux=disabled‘ /etc/selinux/config
cp /etc/sysc...
分类:
Web程序 时间:
2014-09-04 22:25:50
阅读次数:
274
/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置./etc/bashrc:为每一个运行bash shell的用户执行此文件.当bash shell被打开时,该文件被读取.~/.bash...
分类:
系统相关 时间:
2014-09-04 22:08:10
阅读次数:
295
首先生成本机密钥本机执行命令:ssh-keygen-trsa一路回车在/root/.ssh生成了id_rsa和id_rsa.pub,我们要用这个id_rsa.pub2.安装expectyum-yinstallexpect3.用脚本把密码拷贝过去#!/bin/bash
###############需要同步ssh的设备和密码#########
ip=(
192.168.132.130
192.168.132..
分类:
其他好文 时间:
2014-09-04 19:19:00
阅读次数:
165
本文假设的环境是GNU/Linux,且shell是BASH;注 意: 另外, 我们讨论的前提是当你键入一个命令时并没有指定该命令的路径, 举例来说就是我们键入的命令是以commandname的形式而不是/path/commandname或./path/commandname的形式来运行的. 一旦我们...
分类:
系统相关 时间:
2014-09-04 16:47:49
阅读次数:
394
1.clearNginxLog.sh#!/bin/bash#run at 2:00am everydaynginx_pid="/run/nginx.pid"logs_path="/opt/log/nginx"logs_date="$(date -d "yesterday" +"%Y%m%d")_`d...
分类:
其他好文 时间:
2014-09-04 14:52:29
阅读次数:
216
1. for i in `ls *.mp3` 常见的错误写法: for i in `ls *.mp3`; do # Wrong! 为什么错误呢?因为for...in语句是按照空白来分词的,包含空格的文件名会被拆 成多个词。如遇到 01 - Don‘t Eat the Yellow Snow...
分类:
其他好文 时间:
2014-09-04 09:49:38
阅读次数:
179