会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
fives
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
2020年5月20日
grep
摘要: grep: 全局搜索 grep 是linux 中最常用的“文本处理工具之一” 与sed awk 合称为linux中的三剑客! grep 就像你在windows中打开txt文件,使用快捷键“Ctrl+F” 在文本中查找某个字符串一样,可以把grep 理解为字符查找工具 grep 的全程为Global
阅读全文
posted @ 2020-05-20 14:33 fives
阅读(160)
评论(0)
推荐(0)
2020年5月19日
mysql配置文件
摘要: ###主### server-id=1 log-bin=mysql-bin binlog-ignore-db=information_schemabinlog-ignore-db=performance_schemabinlog-ignore-db=mysql ###从### server-id=2
阅读全文
posted @ 2020-05-19 17:17 fives
阅读(108)
评论(0)
推荐(0)
允许192,127开的网段通过 ,其他不允许
摘要: #!/bin/basha=(`cat shu |grep -v "192" |grep -v "127"`)b=$(cat shu |grep "192")c=$(cat shu |grep "127")####shu是一个ip文档###for i in ${a[@]}do iptables -I
阅读全文
posted @ 2020-05-19 17:09 fives
阅读(205)
评论(0)
推荐(0)
猜随机数
摘要: #!/bin/basha=$((RANDOM%100))b=0echo $awhile :dolet b++read -ep "输入一个数" shu if [ $a -eq $shu ]; then echo "相等" break elif [ $a -gt $shu ]; then echo "小
阅读全文
posted @ 2020-05-19 17:07 fives
阅读(174)
评论(0)
推荐(0)
循环备份mysql
摘要: #!/bin/bashbei(){da=`date +%F`read -ep "输入指定要备份的数据库名称" filemkdir -p /opt/$damysqldump -B $file > /opt/$da/$file.sql if [ $? -eq 0 ]; thenecho "备份成功" >
阅读全文
posted @ 2020-05-19 17:06 fives
阅读(258)
评论(0)
推荐(0)
判断mysql主从
摘要: #!/bin/basha=$(mysql -e "show slave status\G" | awk '/Slave_IO_Running/ {print $2}')b=$(mysql -e "show slave status\G" | awk '/Slave_SQL_Running/ {pri
阅读全文
posted @ 2020-05-19 17:05 fives
阅读(1034)
评论(0)
推荐(0)
系统安全巡检
摘要: #!/bin/bash #系统信息###system(){ xi=$(uname) echo "操作系统 $xi " version=`cat /etc/redhat-release` echo "操作系统版本 $version" nei=`uname -r` echo "操作系统内核 $nei"
阅读全文
posted @ 2020-05-19 17:03 fives
阅读(293)
评论(0)
推荐(0)
上一页
1
2
3
4
公告