From 68ad653545cc8e99e0ed0df89509a1de19cf01a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=B9=E5=87=B8=E6=9B=BC?= Date: Tue, 13 Jun 2023 10:26:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E8=AF=BB=E5=8F=96ssh=E6=88=90=E5=8A=9F=E6=97=A5=E5=BF=97=20(#1?= =?UTF-8?q?356)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 凹凸曼 --- backend/app/service/ssh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/service/ssh.go b/backend/app/service/ssh.go index af9a026d4..0142e1911 100644 --- a/backend/app/service/ssh.go +++ b/backend/app/service/ssh.go @@ -248,7 +248,7 @@ func (u *SSHService) LoadLog(req dto.SearchSSHLog) (*dto.SSHLog, error) { data.Logs = append(data.Logs, dataItem...) } } - commandItem := fmt.Sprintf("cat %s | grep Accepted %s", fileList[i], command) + commandItem := fmt.Sprintf("cat %s | grep -a Accepted %s", fileList[i], command) dataItem := loadSuccessDatas(commandItem) data.TotalCount += len(dataItem) if req.Status != constant.StatusFailed {