自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 crontab简介

* * * * * sh /sh/a.sh分 时 天 月 周

2020-09-02 17:53:47 66

原创 进程检查py

import psutilimport osdef checkprocess(processname):pl = psutil.pids()for pid in pl:if psutil.Process(pid).name() == processname:return pidif isinstance(checkprocess(“wps.exe”), int):print(“进程存在”)print(os.popen(‘tasklist’))os.system(‘taskkill /IM

2020-09-02 17:52:03 79

原创 云盘签到

1.进行抓包软件抓包(Charles)2.进行语法转换(https://curl.trillworks.com/)3.进行循环24H签到,或者定时任务

2020-09-02 17:49:09 808

原创 shell文件保留

#!/bin/bash#保留文件数res=5dir=/data/wwwroot/cpu/date=$(date “+%Y%m%d-%H%M%S”)num=$(ls -l $dir|grep ^- |wc -l)while(( $num> res))doOldFile=res))do OldFile=res))doOldFile=(ls -rt dir∣head−1)file=dir| head -1) file=dir∣head−1)file=(ls -rt $dir|

2020-09-02 17:44:47 123

原创 python创建文件夹授权

#!/usr/bin/python3-- coding: --#centos新建文件夹的,并且授权777,wwwimport osimport timelocaltime=time.strftime(’%Y-%m-%d %H:%M:%S’,time.localtime(time.time()))print(os.getcwd())dir=os.chdir(r’/data/wwwroot/isv.hczypay.com/public/upload’)print(dir)print(‘loc

2020-09-02 17:34:38 514 1

原创 服务器检查

服务器检查#!/bin/bash#redis检查red=ps -aux |grep redis|grep -v grep|wc -lif (( $red > 0 ));thenecho “redis正常”elsecurl '钉钉API' \ -H 'Content-Type: application/json' \ -d '{"msgtype": "text", "text": { "content": "redis挂掉了" } }'fi#nginx检查nginx=ps -aux|

2020-09-02 17:32:25 160

原创 网址是否正常检查

网址检查import urllib.requestimport timeimport osimport datetimeopener = urllib.request.build_opener()opener.addheaders = [(‘User-agent’, ‘Mozilla/49.0.2’)]#这个是你放网址的文件名,改过来就可以了file = open(‘E:\脚本\py\test.txt’)#logfile = open(“E:py\log\url.txt”, “a+”)l

2020-09-02 17:29:39 387

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除