随笔分类 - Linux
摘要:1.下载文件获取文件信息,并删除文件 import urllib.request import uuid import os def binarycode(file): with open(file, 'rb') as fileObj: #读取文件信息,返回Byte格式数据 wav_data = f
阅读全文
摘要:1.使用这种方式效率较低,而且不注意可能出现错误 find . -name "*.pc" |xargs wc -l 直接查看 total 不是正确的值。 原因: 这种方式存在一个问题,如果pc的总行数达到几百万时,会自动截断,统计出多个 total (具体原因需通过源码分析) 需要将多个total
阅读全文
摘要:gettimeofday()函数的使用方法 1.函数原型 #include <sys/time.h> int gettimeofday(struct timeval *tv, struct timezone *tz); 2.说明 gettimeofday()会把目前的时间用tv 结构体返回,当地时区
阅读全文
摘要:test@k1rhel5822161:/home/test>cat 31 52 33 24567test@k1rhel5822161:/home/test>grep -e '2|3' 3test@k1rhel5822161:/home/test>grep -E '2|3' 32 33 2test@k
阅读全文