add
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
## 关键字搜索并排序
|
||||
|
||||
```bash
|
||||
grep -h '关键字' *.log | sort
|
||||
```
|
||||
|
||||
## 打印一个时间范围的片段
|
||||
|
||||
按分钟级匹配,按秒的话结束时间不存在日志,会导致一直输出到文件末尾
|
||||
|
||||
```bash
|
||||
sed -n '/2026-03-26 10:15/, /2026-03-26 10:20/p' xxx.log
|
||||
```
|
||||
Reference in New Issue
Block a user