11 2017 档案
摘要:#!/bin/bash ############功能说明部分####################################### #脚本功能是按照每天对mysql数据库中所有表进行备份,备份文件为:数据库名-表名.sql #实例:backup/2016-08-25/uic-test.sql #测试数据还原实例:mysql -uroot -pxxx uic ${backfile}.gz...
阅读全文
摘要:#!/bin/bash if [ $# -le 2 ]; then echo -e "usage : \n\t$0 hostList src_file dst_path" echo -e "example: \n\t$0 hostList file.txt /home/work/opdir" exit 1 fi # concurrent number by defa...
阅读全文
摘要:#!/bin/bash if [ $# -le 1 ]; then echo -e "usage : \n\t$0 hostList REMOTE_CMD" echo -e "example: \n\t$0 hostList \"docker images | grep hive\"" exit 1 fi # concurrent number by default...
阅读全文
摘要:#!/bin/bash if [ $# -le 1 ]; then echo -e "usage : \n\t$0 sdx mount_point" echo -e "example: \n\t$0 sdb /data1" exit 1 fi disk=/dev/$1 homedisk_num=$(df -h | awk '{print $NF}' | grep ...
阅读全文