跳转到内容

SRE笔记

  • 密码
    • 短链
  • 服务器
  • 关于

shell标签存档订阅

shell printf oct hex dec

#shell printf 进制转换 # 10进制转16进制:15 > 0xf printf … 继续阅读 shell printf oct hex dec

  • 发表于: 2023-02-28 2023-02-28
  • 作者: kangder
  • 分类: SRE
  • 标签: bash, shell
  • 发表评论: shell printf oct hex dec

shell bash bash-completion

shell 命令补全 yum install -y bash-completion

  • 发表于: 2022-08-25 2022-08-25
  • 作者: shxiefc
  • 分类: SRE
  • 标签: bash, shell, yum
  • 发表评论: shell bash bash-completion

shell /bin/true /bin/false

/bin/true 固定返回0 /bin/false 固定返回1

  • 发表于: 2022-08-25 2022-08-25
  • 作者: shxiefc
  • 分类: SRE
  • 标签: shell
  • 发表评论: shell /bin/true /bin/false

record history commands on shell

#添加命令记录 echo "export PROMPT_COMMAND='{ m… 继续阅读 record history commands on shell

  • 发表于: 2022-08-22 2022-08-22
  • 作者: shxiefc
  • 分类: SRE
  • 标签: bash, https, sed, shell
  • 发表评论: record history commands on shell

clean harbor via shell

shell清理harbor镜像: #!/bin/bash #需要先安装jq命令,如 yum inst… 继续阅读 clean harbor via shell

  • 发表于: 2022-08-21 2022-08-21
  • 作者: shxiefc
  • 分类: SRE
  • 标签: awk, curl, grep, harbor, https, json, shell, tag
  • 发表评论: clean harbor via shell

shell date get yesterday

获取昨天日期 date -d 'yesterday' date -d &#039… 继续阅读 shell date get yesterday

  • 发表于: 2022-08-17 2022-08-17
  • 作者: aiops
  • 分类: SRE
  • 标签: bash, https, shell
  • 发表评论: shell date get yesterday

ansible install Docker

– name: Remove Docker system yum: name: – docker-c… 继续阅读 ansible install Docker

  • 发表于: 2022-08-14 2022-08-14
  • 作者: aiops
  • 分类: SRE
  • 标签: ansible, Docker, shell, yum
  • 发表评论: ansible install Docker

awk为shell命令加上执行时间

ls /root |awk '{print strftime("%c"… 继续阅读 awk为shell命令加上执行时间

  • 发表于: 2022-07-26 2022-07-26
  • 作者: erer, er
  • 分类: SRE
  • 标签: awk, bash, shell
  • 发表评论: awk为shell命令加上执行时间

shell backup etcd

#!/bin/bash ETCDCTL_PATH='/usr/local/bin/etcd… 继续阅读 shell backup etcd

  • 发表于: 2022-07-25 2022-07-25
  • 作者: erer, er
  • 分类: SRE
  • 标签: etcd, shell, ssl
  • 发表评论: shell backup etcd

shell 逐行处理字符串

#!/bin/bash # name col2 col3 score cat 123.txt |wh… 继续阅读 shell 逐行处理字符串

  • 发表于: 2022-07-25 2022-07-25
  • 作者: erer, er
  • 分类: SRE
  • 标签: bash, shell
  • 发表评论: shell 逐行处理字符串

shell脚本调试

bash -n test.sh #读一遍脚本中的命令但不执行,用于检查脚本中的语法错误。 bash … 继续阅读 shell脚本调试

  • 发表于: 2022-07-18 2022-07-18
  • 作者: erer, er
  • 分类: SRE
  • 标签: bash, shell
  • 发表评论: shell脚本调试

shell命令运行符号 & ; && 三者区别

& 后台执行 不管结果 ;顺序执行 不管结果 && 执行成功再执行后续的命令

  • 发表于: 2022-07-17 2022-07-17
  • 作者: erer, er
  • 分类: SRE
  • 标签: bash, shell
  • 发表评论: shell命令运行符号 & ; && 三者区别

shell if [ “x{val}” == “x” ]

ping=`ping -c 10 -W 1 www.baidu.com` rtt=`echo &qu… 继续阅读 shell if [ “x{val}” == “x” ]

  • 发表于: 2022-07-12 2022-07-12
  • 作者: erer, er
  • 分类: SRE
  • 标签: bash, grep, shell
  • 发表评论: shell if [ “x{val}” == “x” ]

golang shell color

import ( "fmt" "github.com/fatih/co… 继续阅读 golang shell color

  • 发表于: 2022-06-20 2022-06-23
  • 作者: bfyt
  • 分类: SRE
  • 标签: go, golang, shell
  • 发表评论: golang shell color

Linux 使用 shell

#支持的 Shell 种类 [root@node01 ~]# cat /etc/shells /bi… 继续阅读 Linux 使用 shell

  • 发表于: 2022-03-04 2022-03-04
  • 作者: stnds
  • 分类: SRE
  • 标签: bash, https, shell
  • 发表评论: Linux 使用 shell

创建无ssh权限的用户

new: useradd –home /dev/null –shell /sbin/nologi… 继续阅读 创建无ssh权限的用户

  • 发表于: 2022-02-27 2022-02-27
  • 作者: stnds
  • 分类: SRE, 开发
  • 标签: bash, https, shell, ssh
  • 发表评论: 创建无ssh权限的用户

MTProxy代理工具

wget https://raw.githubusercontent.com/TyrantJoy/O… 继续阅读 MTProxy代理工具

  • 发表于: 2022-02-20 2022-02-20
  • 作者: stnds
  • 分类: SRE
  • 标签: bash, https, shell
  • 发表评论: MTProxy代理工具

shell use http proxy

export http_proxy=’http://172.16.0.2:8118′ export … 继续阅读 shell use http proxy

  • 发表于: 2021-12-20 2021-12-20
  • 作者: tesla
  • 分类: SRE
  • 标签: bash, curl, ftp, http, https, proxy, shell
  • 发表评论: shell use http proxy

shell使用http代理

export http_proxy=’http://192.168.2.2:1080′ export… 继续阅读 shell使用http代理

  • 发表于: 2021-09-29 2021-09-29
  • 作者: dn
  • 分类: SRE
  • 标签: bash, ftp, http, https, proxy, shell
  • 发表评论: shell使用http代理

shell判断变量是否为空

#!/bin/sh  dmin= if [ “$dmin” = “” ] then   echo “… 继续阅读 shell判断变量是否为空

  • 发表于: 2021-09-24 2021-09-24
  • 作者: dn
  • 分类: SRE
  • 标签: bash, https, shell
  • 发表评论: shell判断变量是否为空

分页

页码: 1 页码: 2 页码: 3 页码: 4 页码: 5 下一页

搜索

搜索:

近期评论

  • 周周 发表在《Kubernetes部署NextCloud网盘》
  • mysql m-s via gtid – SRE笔记 发表在《MySQL SET GTID_NEXT》
  • kangder 发表在《Kubernetes部署NextCloud网盘》
  • xs 发表在《Kubernetes部署NextCloud网盘》
  • test 发表在《gin不转义html标签》

标签

aws (15) bash (1123) Blockchain (28) centos (28) Docker (105) elasticsearch (26) eth (34) fil (39) go (129) golang (154) Grafana (13) hpc (15) http (299) https (1999) ingress (14) iptables (20) java (75) JVM (20) kubernetes (309) Linux (546) lotus (30) mongoDB (41) MySQL (184) nginx (112) php (25) python (148) redis (34) s3 (75) shell (20) springboot (32) tcp (69) tomcat (15) ubuntu (31) vue (18) windows (42) wordpress (14) zabbix (37) 夏小胖 (31) 安全 (55) 工具 (451) 折腾 (24) 推荐 (15) 硬件 (61) 网络 (246) 资源 (49)

归档

  • 2024 年 12 月
  • 2024 年 11 月
  • 2024 年 10 月
  • 2024 年 9 月
  • 2024 年 8 月
  • 2024 年 7 月
  • 2024 年 6 月
  • 2024 年 5 月
  • 2024 年 4 月
  • 2024 年 3 月
  • 2024 年 2 月
  • 2024 年 1 月
  • 2023 年 12 月
  • 2023 年 11 月
  • 2023 年 10 月
  • 2023 年 9 月
  • 2023 年 8 月
  • 2023 年 7 月
  • 2023 年 6 月
  • 2023 年 5 月
  • 2023 年 4 月
  • 2023 年 3 月
  • 2023 年 2 月
  • 2023 年 1 月
  • 2022 年 12 月
  • 2022 年 11 月
  • 2022 年 10 月
  • 2022 年 9 月
  • 2022 年 8 月
  • 2022 年 7 月
  • 2022 年 6 月
  • 2022 年 5 月
  • 2022 年 4 月
  • 2022 年 3 月
  • 2022 年 2 月
  • 2022 年 1 月
  • 2021 年 12 月
  • 2021 年 11 月
  • 2021 年 10 月
  • 2021 年 9 月
  • 2021 年 8 月
  • 2021 年 7 月
  • 2021 年 6 月
  • 2021 年 5 月
  • 2021 年 4 月
  • 2021 年 3 月
  • 2021 年 2 月
  • 2021 年 1 月
  • 2020 年 12 月
  • 2020 年 11 月
  • 2020 年 10 月
  • 2020 年 9 月
  • 2020 年 8 月
  • 2020 年 7 月
  • 2020 年 6 月
  • 2020 年 5 月
  • 2020 年 4 月
  • 2020 年 3 月
  • 2020 年 2 月
  • 2020 年 1 月
  • 2019 年 12 月
  • 2019 年 11 月
  • 2019 年 10 月
  • 2019 年 9 月
  • 2019 年 8 月
  • 2019 年 7 月
  • 2019 年 6 月
  • 2019 年 5 月
  • 2019 年 4 月
  • 2019 年 3 月
  • 2019 年 2 月
  • 2019 年 1 月
  • 2018 年 12 月
  • 2018 年 11 月
  • 2018 年 10 月
  • 2018 年 9 月
  • 2018 年 8 月
  • 2018 年 7 月
  • 2018 年 6 月
  • 2018 年 5 月
  • 2018 年 4 月
  • 2018 年 3 月
  • 2018 年 2 月
  • 2018 年 1 月
  • 2017 年 12 月
  • 2017 年 11 月
  • 2017 年 10 月
  • 2017 年 8 月
  • 2017 年 7 月
  • 2017 年 6 月
  • 2017 年 5 月
  • 2017 年 4 月
  • 2017 年 3 月
  • 2017 年 2 月
  • 2017 年 1 月
  • 2016 年 12 月
  • 2016 年 11 月
  • 2016 年 10 月
  • 2016 年 9 月
  • 2016 年 8 月
  • 2016 年 7 月
  • 2016 年 6 月
  • 2016 年 5 月
  • 2016 年 4 月
  • 2016 年 3 月
  • 2016 年 2 月
  • 2016 年 1 月
  • 2015 年 12 月
  • 2015 年 10 月
  • 2015 年 9 月
  • 2015 年 8 月
  • 2015 年 7 月
  • 2015 年 6 月
  • 2015 年 5 月
  • 2015 年 4 月
  • 2015 年 3 月
  • 2015 年 2 月
  • 2015 年 1 月
  • 2014 年 12 月
  • 2014 年 11 月
  • 2014 年 10 月
  • 2014 年 9 月
  • 2014 年 8 月
  • 2014 年 7 月
  • 2014 年 6 月
  • 2014 年 5 月
  • 2014 年 2 月