摘要:
1、select的实现(fs/select.c) 主要涉及三个函数sys_select() à core_sys_select() à do_select() 每次调用select,都会将用户态的fd拷贝至内核态 do_select()会 1) 循环遍历每一个fd,调用对应的驱动的poll函数,po 阅读全文
摘要:
#include "tinyxml2.h" //创建一个XML void CreateXml() { //添加根元素root tinyxml2::XMLDocument* doc = new tinyxml2::XMLDocument(); tinyxml2::XMLElement* root = 阅读全文
摘要:
解压rpm包 rpm2cpio package.rpm | cpio -idmv 查询是否安装 rpm -q 安装包名称 安装rpm包 rpm -ivh 安装包名称 卸载安装包 rpm -e 安装包 阅读全文
摘要:
python 可以使用requests模块进行http协议通信 #!/usr/bin/python3 # -*- coding: UTF-8 -*- #参考 https://blog.csdn.net/m0_71986704/article/details/130046305 import requ 阅读全文
摘要:
#!/usr/bin/python3 # -*- coding: UTF-8 -*- import _thread import socket import time def tcp_server(threadName, delay): s=socket.socket(socket.AF_INET, 阅读全文
摘要:
grep -A N 这里的N是num, 表示显示匹配行后的N行文本 阅读全文
摘要:
参考:https://www.cnblogs.com/liwei0526vip/p/5644163.html 阅读全文
摘要:
参考:https://blog.csdn.net/anqixiang/article/details/117903529 awk:能够对文本的每一行都进行复杂的格式处理,它支持关系运算符、算法运算符, 正则表达式, if ,while,for等逻辑,是一种处理文本的语言。 基本格式: awk '{p 阅读全文
摘要:
#!/usr/bin/python3 # -*- coding: UTF-8 -*- import datetime import time #时间戳 ticks=time.time() print(ticks) #结构体时间{tm_year...} localtime=time.localtime 阅读全文
摘要:
字典,类似json #!/usr/bin/python3 # -*- coding: UTF-8 -*- import json data={'name':'abc', 'age':{'zhousui':7, 'xusui':8}, 'class': 'first'} print(data) str 阅读全文