使用 kubeadm部署1.17.3[基于Ubuntu18.04] 环境 所有节点初始化 # cat <<EOF>> /etc/hosts 192.168.1.210 k8s-m1 192.168.1.211 k8s-node1 192.168.1.212 k8s-node2 EOF # vm1 h ...
分类:
系统相关 时间:
2020-05-28 13:19:22
阅读次数:
71
1.根据访问IP统计UV awk '{print $1}' access.log|sort | uniq -c |wc -l 2.统计访问URL统计PV awk '{print $7}' access.log|wc -l 3.查询访问最频繁的URL awk '{print $7}' access.l ...
分类:
其他好文 时间:
2020-05-28 13:09:14
阅读次数:
60
1 #!/bin/env sh 2 3 declare -i max=0 4 declare -i min=32765 5 declare -a zz 6 7 for x in `seq 0 1 9`;do 8 zz[x]=$RANDOM 9 [ ${zz[x]} -gt $max ] && max ...
分类:
其他好文 时间:
2020-05-28 13:07:42
阅读次数:
53
原因:cron的环境变量和shell脚本的环境变量不一样 解决办法: 方法一:定时任务里面切换到root执行(亲测可用) */5 * * * * su - root -c "/opt/test.sh" 方法二:在脚本里面添加环境变量(未测试过) vi /opt/tes.sh #!/bin/bash ...
分类:
系统相关 时间:
2020-05-28 13:05:19
阅读次数:
475
1.test命令 也可以用[ ]来表示 返回值为0时为true,返回值为1时为false。 例1:str1=aaa,str2=bbb 1)判断字符串是否为空(省略了-n选项,-n选项是不为空,-z选项为空) [root@xiaoxiao ~]# str1=aaa [root@xiaoxiao ~]# ...
分类:
系统相关 时间:
2020-05-28 10:24:07
阅读次数:
74
一、将ReentrantLock和synchronized进行比较 1、synchronized和ReentrantLock都是独占锁,不同的是synchronized加锁和解锁过程自动进行;ReentrantLock需手动加锁解锁。 2、synchronized和ReentrantLock都可重入 ...
分类:
其他好文 时间:
2020-05-28 09:16:38
阅读次数:
65
import lxml.html,requests,pyperclipurl='https://www.python.org/dev/peps/pep-0020/'xpath='//*[@id="the-zen-of-python"]/pre/text()'res=requests .get (ur ...
分类:
编程语言 时间:
2020-05-28 09:14:09
阅读次数:
102
介绍: 为什么文件上传存在漏洞 上传文件时,如果服务器代码未对客户端上传的文件进行严格的验证和过滤,就容易造成 可以上传任意文件的情况,包括上传脚本文件(asp、aspx、php、jsp 等格式的文件)。 ·危害 非法用户可以利用上传的恶意脚本文件控制整个网站,甚至控制服务器。这个恶意的脚本 文件, ...
分类:
Web程序 时间:
2020-05-28 00:59:39
阅读次数:
206
第一,用sort+uniq,注意,单纯uniq是不行的。sort -n test.txt | uniq 第二,用sort+awk命令,注意,单纯awk同样不行,原因同上。 sort -n $file | awk '{if($0!=line)print; line=$0}' 第三,用sort+sed命 ...
分类:
其他好文 时间:
2020-05-28 00:59:24
阅读次数:
61
下载地址: https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/htmlsingle/#getting-started-installing-the-cli 下载地址中的对应位置 如下所示, ctrl + f 快捷键查找 1 ...
分类:
编程语言 时间:
2020-05-28 00:48:06
阅读次数:
146