From cbc0a991cc52dfd1e3b483c25edcaf2fc72a4a10 Mon Sep 17 00:00:00 2001 From: 8ga Date: Fri, 3 Apr 2026 16:42:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Linux=E5=AE=9E=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E4=B8=80=E4=BA=9B=E5=91=BD=E4=BB=A4.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Linux实用的一些命令.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Linux实用的一些命令.md b/Linux实用的一些命令.md index 4eec6db..6c4bcb9 100644 --- a/Linux实用的一些命令.md +++ b/Linux实用的一些命令.md @@ -1,5 +1,11 @@ ## 关键字搜索并排序 -``` +```bash grep -h '关键字' *.log | sort +``` + +## 打印一个时间范围的片段 + +```bash +sed -n '/2026-03-26 10:15/, /2026-03-26 10:20/p' xxx.log ``` \ No newline at end of file