import time#时间戳,从计算机诞生那一天到现在过了多少秒 1621063294#格式化好的时间 2021-5-15 19:38:23#2021515 ->50天后print( int(time.time()) ) #获取当前的时间戳print( time.strftime('%Y-%m-% ...
                            
                            
                                分类:
编程语言   时间:
2021-05-24 13:22:39   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                linux 常用命令:文件、网络、性能 一.常用命令 文件 ls cd pwd mkdir cp rm mv 文件属性 # 授权 r: 读权限 4; w: 写权限 2; x: 操作权限 ; r+w+x=7,是最高权限 chomd 777 文件名 网络 ping # 测试网络连接情况 ping -c  ...
                            
                            
                                分类:
系统相关   时间:
2021-05-24 10:00:59   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                写入文件的基本操作 f = open('01.txt',mode='a') f.write("\nhelloworld\n") import time def get_time(): return time.strftime('%Y_%m_%d-%H_%M') # TODO 创建一个文件,文件名为当 ...
                            
                            
                                分类:
其他好文   时间:
2021-05-24 09:05:40   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                #!/bin/bash while read linedo echo $line txt=`echo $line |awk -F' ' '{print $1}'` id=`echo $line|awk -F' ' '{print $3}'` echo $txt echo $id sed "s/ws2 ...
                            
                            
                                分类:
系统相关   时间:
2021-05-03 12:39:24   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    ps aux|grep java | grep -v grep |awk '{print "kill -9 "$2}'|sh awk文本分析指令,读入一列表(含有换行符,作为一条记录),在一条记录中已空格或者table作为分割符分成n个域,$0表示所以域即整条记录,$1标识第二个域中的内容,$n表示 ...
                            
                            
                                分类:
系统相关   时间:
2021-04-24 13:49:09   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    1、测试数据 [root@centos7 test3]# cat b.txt e t s e s g m x w d g i d t e g x g e w 2、打印匹配w的行 [root@centos7 test3]# cat b.txt e t s e s g m x w d g i d t e ...
                            
                            
                                分类:
系统相关   时间:
2021-04-24 13:18:10   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                今天决定把Debian 10.1自带的4.19内核升级到5.2.14。 需要的工具automake、make、g++(包含gcc)、bison、flex、libelf-dev、libssl-dev、bc。 懒人命令: sudo apt install -y automake make g++ bis ...
                            
                            
                                分类:
其他好文   时间:
2021-04-23 11:58:49   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                统计tomcat的access日志的ip次数,并按次数排序 awk '{sum[$1]++}END{for(i in sum) print i "\t" sum[i]}' localhost_access_log.* | sort -n -k2 统计某个接口的调用时间 awk '{if($7~/.* ...
                            
                            
                                分类:
数据库   时间:
2021-04-21 12:18:10   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                linux 监控服务器流量 #!/bin/bash ethn=$1 while true do RX_pre=$(cat /proc/net/dev | grep $ethn | sed 's/:/ /g' | awk '{print $2}') TX_pre=$(cat /proc/net/dev ...
                            
                            
                                分类:
系统相关   时间:
2021-04-21 12:03:54   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                恢复内容开始 # 时间分为3中格式:# 1.时间戳:从1970年到现在经过的秒数# 作用 用于时间间隔的计算print(time.time())# 2.按照某种格式显示的时间:2020-01-30 11:11:11# 作用:用于展示时间print(time.strftime('%Y-%m-%d %H ...
                            
                            
                                分类:
其他好文   时间:
2021-04-19 15:01:35   
                                阅读次数:
0