1 编辑测试文件 [root@hz-kvm cephdisk3]# cat > 1.txt <<EOF> 120Tib> EOF 2 显示文件[root@hz-kvm cephdisk3]# cat 1.txt120Tib 3 过滤字母到其他文件[root@hz-kvm cephdisk3]# ca ...
分类:
系统相关 时间:
2020-02-19 00:33:09
阅读次数:
103
1、find 文件查找 查找txt和pdf文件 find . ( -name "*.txt" -o -name "*.pdf" ) -print 正则方式查找.txt和pdf find . -regex ".*(.txt|.pdf)$" -iregex:忽略大小写的正则 否定参数查找所有非txt文本 ...
分类:
系统相关 时间:
2020-02-18 14:41:08
阅读次数:
78
对于shell脚本的输出,如果要输出json格式的内容,我们可以借助python -m json.tool命令 比如 echo '{"name":"zhangsan", "age":"18"}' | python -m json.tool 首先,大括号外面必须有单引号'',因为在shell里面大括号 ...
分类:
Web程序 时间:
2020-02-18 13:14:07
阅读次数:
174
什么是IPython?可能很多人已经在用,却不知道它到底是什么。 根据维基百科的解释: IPython是一种基于Python的交互式解释器,提供了强大的编辑和交互功能。 IPython拥有: 1. 满足你各种需求的交互式shell 2. 火爆数据科学社区的Jupyter内核(供Jupyter Not ...
分类:
编程语言 时间:
2020-02-18 12:48:51
阅读次数:
83
一、前期说明 场景:服务器可以正常访问互联网的情况下 方法:通过shell+crond来让其实现每隔5分钟更新一次系统时间 二、shell脚本 脚本名称:update_os_time.sh 存放位置: /server/scripts/ 注意事项:请检查是否存在ntpdate命令,若没有,则用yum ...
分类:
其他好文 时间:
2020-02-18 09:51:36
阅读次数:
143
参考来源:https://wiki.swoole.com/wiki/page/p-server/reload.html shell代码: echo "loading..." pid=$(pidof live) # pid= `pidof live` echo $pid kill -usr1 $pid ...
分类:
其他好文 时间:
2020-02-18 09:46:24
阅读次数:
94
写一个最简单的shell脚本,了解shell脚本是如何传参 1、 vim test1.sh name=$1 age=$2 echo ${name} echo ${age} View Code 2.调用脚本并传参 sh test1.sh zhangsan 14 11、 vim test1.py tes ...
分类:
编程语言 时间:
2020-02-17 17:43:02
阅读次数:
200
[TOC] 下载 https://git scm.com/ 安装 默认下一步 配置 1、配置SSH key 1.运行Git Bash ssh keygen t rsa C "邮件地址"// 填写你的github注册邮箱 ...
分类:
其他好文 时间:
2020-02-17 17:39:08
阅读次数:
80
shell-init: error retrieving current directory: getcwd: cannot access parent directories: 没有那个文件或目录chdir: error retrieving current directory: getcwd: ...
分类:
数据库 时间:
2020-02-17 15:40:12
阅读次数:
105