上一页 1 ··· 51 52 53 54 55
摘要: 本次利用openssl建立私有CA,实现https加密通信. openssl由三部分组成: libencrypto库 libssl库 openssl多用途命令行工具 加密算法和协议: 对称加密算法和协议: 公钥体系:分为公钥和私钥 DES: Data Encryption Standard(IBM研 阅读全文
posted @ 2020-05-29 18:32 ascertain 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 判断变量是否为空 [ $var ];echo $? [[ $var ]];echo $? test -z "$var";echo $? test -n "$var";echo $? [ -z "$var" ];echo $? [ -n "$var" ];echo $? [[ -n $var ]];e 阅读全文
posted @ 2020-05-29 14:34 ascertain 阅读(304) 评论(0) 推荐(0) 编辑
摘要: openssl enc symmetric cipher routines对称加密 openssl enc -e -des3 -base64 -salt -in file -out file openssl enc -d -des3 -base64 -salt -in file -out file 阅读全文
posted @ 2020-05-28 21:36 ascertain 阅读(216) 评论(0) 推荐(0) 编辑
摘要: #!/bin/env sh [ -r /etc/hostname ] && source /etc/hostname HOSTNAME=${hostname:-www.abc.com} hostname $HOSTNAME /etc/hostname hostname=www.ibm.com ./f 阅读全文
posted @ 2020-05-28 19:00 ascertain 阅读(196) 评论(1) 推荐(0) 编辑
摘要: 询问客户需安装的OS版本,是否安装图形界面 询问安装的软件环境 了解机器安装位置,对机器噪音的敏感度 装备,清点配件,键盘,鼠标,显示器接口,插排,网线,机柜 安装os和各种软件,测试无误 测试各配件,试运行 联系客户预约时间,到现场安装调试,客户验收. 阅读全文
posted @ 2020-05-28 14:03 ascertain 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 字符串切片: ${var:offset:number} 取字符串的最右侧几个字符:${var: -lengh} 注意:冒号后必须有一空白字符; 基于模式取子串: ${var#*word}:其中word可以是指定的任意字符;功能:自左而右,查找var变量所存储的字符串中,第一次出现的word, 删除字 阅读全文
posted @ 2020-05-28 13:45 ascertain 阅读(885) 评论(0) 推荐(0) 编辑
摘要: 1 #!/bin/env sh 2 3 read -p 'input length of array:' var 4 [[ ! $var =~ [[:digit:]] ]] && echo 'input wrong' && exit 5 5 6 declare -a pp 7 8 for z in 阅读全文
posted @ 2020-05-28 13:36 ascertain 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-05-28 12:26 ascertain 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 1 #!/bin/env sh 2 3 function bb(){ 4 declare -i p=1 5 until [ $p -gt $1 ];do 6 declare -i z=1 7 until [ $z -gt $p ];do 8 echo -ne "${z}X${p}=$[z*p]\t" 阅读全文
posted @ 2020-05-26 20:20 ascertain 阅读(405) 评论(0) 推荐(0) 编辑
摘要: #!/bin/env sh program=`basename $0|awk -F. '{print $1}'` lock=/var/lock/subsys/$program source /etc/rc.d/init.d/functions function start(){ if [ -e $l 阅读全文
posted @ 2020-05-26 19:11 ascertain 阅读(138) 评论(0) 推荐(0) 编辑
摘要: curl --request HEAD --include jd.com 用HEAD方法请求,必须加--include,否则无响应 --include Include protocol headers in the output curl会打印header信息 --interface Specify 阅读全文
posted @ 2020-05-26 11:53 ascertain 阅读(175) 评论(0) 推荐(0) 编辑
摘要: bash中即使declare -x或export的变量,子shell可以引用和改变,但是该改变无法作用到父shell中. 阅读全文
posted @ 2020-05-26 10:50 ascertain 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 当赋予普通用户sudo权限后,root密码很不安全,可用利用chattr来限制/etc/sudoers和/etc/sudoers.d的更改 chattr常用选项 i (immutable) 不允许修改,如果目录具有这个属性,那么任何的进程只能修改目录之下的文件,不允许建立和删除文件。 a (appe 阅读全文
posted @ 2020-05-25 19:56 ascertain 阅读(571) 评论(0) 推荐(0) 编辑
摘要: 1 #!/bin/env sh 2 3 declare -i p z 4 5 for ((p=1;p<=9;p++));do 6 for ((z=1;z<=p;z++));do 7 echo -e "${z}X${p}=$[p*z]\t\c" 8 done 9 echo 10 done 11 12 阅读全文
posted @ 2020-05-25 19:23 ascertain 阅读(169) 评论(0) 推荐(0) 编辑
摘要: #!/bin/env sh source /etc/rc.d/init.d/functions declare -i p=1 declare -i online=0 declare -i offline=0 net='192.168.8' while [[ $p -le 10 ]];do ping 阅读全文
posted @ 2020-05-25 18:59 ascertain 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 1 #!/bin/env bash 2 3 declare -i max min 4 declare -a mm 5 6 for z in `seq 1 1 10`;do 7 if [[ $z -eq 1 ]];then 8 max=min=$RANDOM 9 mm[$z]=$max 10 cont 阅读全文
posted @ 2020-05-25 18:13 ascertain 阅读(1708) 评论(0) 推荐(0) 编辑
上一页 1 ··· 51 52 53 54 55