소스 검색

Get the last 60 minutes of httpd logs from /var/log/httpd/access_log

pull/47/head
lbonanomi 5 년 전
부모
커밋
e76d0bb888
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. +6
    -0
      README.md

+ 6
- 0
README.md 파일 보기

@@ -2222,6 +2222,12 @@ awk '!x[$0]++' filename
awk '{$1=$3=""}1' filename
```

###### Get the last hour of Apache logs

```bash
awk '/'$(date -d "1 hours ago" "+%d\\/%b\\/%Y:%H:%M")'/,/'$(date "+%d\\/%b\\/%Y:%H:%M")'/ { print $0 }' /var/log/httpd/access_log
```

___

##### Tool: [sed](http://www.grymoire.com/Unix/Sed.html)


불러오는 중...
취소
저장