摘要: // n位随机数生成 function randomNum(n) { let sString = ""; let strings = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; for (i = 0; i < n 阅读全文
posted @ 2021-08-17 17:16 lucky_tomato 阅读(898) 评论(0) 推荐(0)
摘要: class InfoMG(View): @method_decorator(csrf_exempt) @method_decorator(login_required) def dispatch(self, request, *args, **kwargs): return super(InfoMG 阅读全文
posted @ 2021-08-16 19:26 lucky_tomato 阅读(600) 评论(0) 推荐(0)
摘要: salt-cp '节点名字' 源路径 目标路径 salt-cp 'test1' /root/test.sh /tmp/test.sh 阅读全文
posted @ 2021-08-08 17:49 lucky_tomato 阅读(105) 评论(0) 推荐(0)
摘要: 查看僵尸进程 ps -A -ostat,ppid,pid,cmd |grep -e '^[Zz]' 杀死僵尸进程 kill -15 ppid 阅读全文
posted @ 2021-08-08 17:42 lucky_tomato 阅读(462) 评论(0) 推荐(0)
摘要: find ./ -type f -name consumer.xml -exec sed -i "s/aaaa/bbb/g" {} \; 阅读全文
posted @ 2021-08-08 17:26 lucky_tomato 阅读(188) 评论(0) 推荐(0)
摘要: netstat -an|awk '/^tcp/{++S[$NF]}END{for (a in S)print a,S[a]}' 输出结果: TIME_WAIT 65 ESTABLISHED 99 CLOSING 1 LISTEN 735 阅读全文
posted @ 2021-08-08 17:24 lucky_tomato 阅读(607) 评论(0) 推荐(0)
摘要: du -x --max-depth=1/ |sort -k1 -nr 阅读全文
posted @ 2021-08-08 17:22 lucky_tomato 阅读(240) 评论(0) 推荐(0)
摘要: 显示当前目录下前十个使用inodes最多的目录 find -type f | awk -F / -v OFS=/ '{$NF="";dir[$0]++}END{for(i in dir)print dir[i]""i}'|sort -k1 -nr|head 显示/data目录下前十个使用inodes 阅读全文
posted @ 2021-08-08 17:18 lucky_tomato 阅读(833) 评论(0) 推荐(0)
摘要: ip a|grep "global" | awk '{print $2}' |awk -F / '{print $1}' 阅读全文
posted @ 2021-08-08 17:15 lucky_tomato 阅读(498) 评论(0) 推荐(0)
摘要: 1.在某张表添加一个字段 alter table 表名(table_name) add 字段(field) 2.在某张表删除一个字段 ALTER TABLE 表名(table_name) drop COLUMN 字段(field); 3.修改某张表字段不为空 alter table 表名(table 阅读全文
posted @ 2021-08-08 10:31 lucky_tomato 阅读(84) 评论(0) 推荐(0)