Skip to content

View the log content of nginx for a certain period of time #38

Open
@openHacking

Description

@openHacking

#nginx log

192.168.1.1 - - [24/Feb/2022:08:00:00 +0800] "GET / HTTP/1.0" 200 241 "-" "-"
192.168.1.2 - - [24/Feb/2022:08:33:45 +0800] "GET / HTTP/1.0" 200 241 "-" "-"

#command

awk '{split($4,array,"[");if(array[2]>="24/Feb/2022:08:00:00" && array[2]<="25/Feb/2022:09:00:00"){print $0}}' access.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions