更新 Linux实用的一些命令.md
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
## 关键字搜索并排序
|
## 关键字搜索并排序
|
||||||
|
|
||||||
```
|
```bash
|
||||||
grep -h '关键字' *.log | sort
|
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