随笔分类 -  shell

ssh 免密码设置失败原因总结
摘要:ssh 免密码设置失败原因总结 先复习一下设置ssh免密码操作的步骤: 进入主目录 cd 生成公钥 ssh-keygen -t rsa -P '' (注:最后是二个单引号,表示不设置密码) 然后分发公钥到目标机器 ssh-copy-id -i ~/.ssh/id_rsa.pub 用户名@对方机器IP 阅读全文

posted @ 2019-02-15 10:36 Shihu 阅读(226) 评论(0) 推荐(0)

sysbench测试MySQL筛选tps
摘要:log=$1tps_array=`awk -F '[,:]' '{print $4}' ${log}`zero=0 for tps in ${tps_array}do tps=`echo ${tps} |tr -d "."` if [ ${tps} -eq 0 ] then zero=`expr $ 阅读全文

posted @ 2018-10-16 20:06 Shihu 阅读(409) 评论(0) 推荐(0)

shell中获取本机ip地址
摘要:shell中获取本机ip地址 方法一: /sbin/ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:" or /sbin/ifconfig|sed -n '/inet addr/s/ 阅读全文

posted @ 2018-10-13 13:57 Shihu 阅读(12480) 评论(0) 推荐(0)

scp和rsync命令
摘要:http://man.linuxde.net/rsync 阅读全文

posted @ 2018-10-13 10:41 Shihu 阅读(185) 评论(0) 推荐(0)

说说shell脚本中的export 和 source,bash
摘要:https://www.cnblogs.com/flying-tiger/p/5616934.html 小弟刚刚接触linux,对linux上的很多东西都比较陌生,所以写一写博客,当做自己工作的总结和技术的积累吧,也是鞭策自己不断努力的去学习。 今天之所以起这个标题,把export,source , 阅读全文

posted @ 2018-09-18 14:23 Shihu 阅读(953) 评论(0) 推荐(0)

Shell 基本运算符
摘要:Shell 基本运算符 http://www.runoob.com/linux/linux-shell-basic-operators.html Shell 和其他编程语言一样,支持多种运算符,包括: 算数运算符 关系运算符 布尔运算符 字符串运算符 文件测试运算符 原生bash不支持简单的数学运算 阅读全文

posted @ 2018-09-18 11:40 Shihu 阅读(162) 评论(0) 推荐(0)

导航