压缩.log 文件为zip后删除原文件 需要注意:本人作为小白,该脚本需要和.log在一起,后面有时间需要改正. #!/usr/local/python/bin/python #-*-coding=utf8 -*- import time import os import sys import zipfile N = 7 #设置删除多少天前的文件 def zip(srcpath): for folder,sumfolder,files in os.walk(srcpath): for file
查找:上代码. function isBigEnough(element) { return element >= 15; } var ret1 = [12, 5, 8, 130, 44].findIndex(isBigEnough); console.log(ret1); // index of 4th element in the Array is returned, // so this will result in '3' var objArr = [{id:1, name:'jiank