1.日期输出格式化所有日期、时间的api都在datetime模块内。1.datetime=>stringnow=datetime.datetime.now()now.strftime(‘%Y-%m-%d%H:%M:%S‘)#输出2012-03-0516:26:23.870105strftime是datetime类的实例方法。2.string=>datetimet_str=‘2012-0
分类:
编程语言 时间:
2020-01-16 21:59:10
阅读次数:
79
[root@localhost ~]# echo $(seq 1 10) #取出1至10内的整数。 1 2 3 4 5 6 7 8 9 10 [root@localhost ~]# c=$(echo 5.12*2+0.876 |bc) #bc命令计算浮点数。 [root@localhost ~]# ...
分类:
编程语言 时间:
2020-01-16 21:53:12
阅读次数:
75
1. 日期输出格式化 所有日期、时间的api都在datetime模块内。 1. datetime = string strftime是datetime类的实例方法。 2. string = datetime strptime是datetime类的静态方法。 2. 日期比较操作 在datetime模块 ...
分类:
编程语言 时间:
2020-01-16 21:44:11
阅读次数:
74
一、代码 更多代码案例:https://www.programcreek.com/python/example/62809/win32ui.CreateBitmap import time import win32api import win32con import win32gui import ...
分类:
编程语言 时间:
2020-01-15 14:17:33
阅读次数:
126
1. 日期输出格式化 所有日期、时间的api都在datetime模块内。 1. datetime => string now = datetime.datetime.now() now.strftime('%Y-%m-%d %H:%M:%S') #输出2012-03-05 16:26:23.8701 ...
分类:
编程语言 时间:
2020-01-15 14:11:29
阅读次数:
85
1.find 查找文件: 将目前目录及其子目录下所有延伸档名是 c 的文件列出来。 find . -name "*.c" 2.查找文件里的字符串等 grep "被查找的字符串" 文件名 3.vi/less中的搜索某各字符串,用/字符串或?字符串,按n表示下一个 sed \awk\grep区别: ht ...
分类:
系统相关 时间:
2020-01-15 11:34:57
阅读次数:
84
/etc/init.d/usbarbitrator stopchkconfig usbarbitrator off esxcli storage core device list |grep -i usb ls /dev/disks/ partedUtil delete /dev/disks naa ...
分类:
其他好文 时间:
2020-01-14 16:16:49
阅读次数:
393
chkconfig命令使用 自启动目录脚本应该放在/etc/init.d/ [root@localhost ~]$ chkconfig --list # 列出所有被chkconfig管理的服务 [root@localhost ~]$ chkconfig --add httpd # 添加指定的服务,让 ...
分类:
其他好文 时间:
2020-01-14 10:14:11
阅读次数:
93
转自:linux awk 命令详解 简介 awk是一个强大的文本分析工具,相对于grep的查找,sed的编辑,awk在其对数据分析并生成报告时,显得尤为强大。简单来说awk就是把文件逐行的读入,以空格为默认分隔符将每行切片,切开的部分再进行各种分析处理。 awk有3个不同版本: awk、nawk和g ...
分类:
系统相关 时间:
2020-01-13 16:37:16
阅读次数:
128
前提 AWK是一种处理文本文件的语言,是一个强大的文本分析工具。 本文将使用命令awk将具有某个关键字的段落提取出来。 准备数据 段落提取 假设我们需要的关键字为 nid=0x63ef ...
分类:
其他好文 时间:
2020-01-13 00:49:16
阅读次数:
371