shell 脚本常用工具箱
#!/bin/env bash
##this is centos system normal toolbar
##author xw 2018.3.21
clear
menu() {
cat <<-EOF
h. help
f. disk partition
d. disk mount
m. memmory
...
使用shell 脚本为centos 服务器自动配置阿里云yum源
#!/usr/bin/env bash
##this is yum configure script
##author xw 2018.3.19
system_osversion=`cat /etc/redhat-release | awk ' {print $4}' | awk -F"." '{print $1"."$2}'`
if [ &quo...
centos 7和6的主要区别
1.centos7目前已经更新至7.4版本了(http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1708.iso download地址),但是6的部分版本还存在大部分企业,总结一下,必定有用2.主要区别:桌面系统[CentOS6] GNOME 2.x[CentOS7] GNOME 3.x(GNOME ...
shell 批量创建用户
#!/bin/env bash
. /etc/init.d/functions
[ $UID -ne 0 ] &&{
echo "plese talk administrator"
exit 1
}
for n in `seq -w 10`
do
pass="`echo $RANDOM|md5sum|cut -c 2-9`"...
shell脚本报警内存使用量
#!/bin/env bash
##this is memmorycontrol Script
##author xw 2018.3.16
mem_used=`free -m |grep '^Mem' |awk '{print $3}'`
mem_total=`free -m |grep '^Mem' |awk '{print $2}'`
mem_percent=$((mem_used * ...