1

The access-log on my lighttpd server is kind of huge, apx 5GB.

Now I need to extract all data from a given date, 12th of February, from the log file and if possible save to new file. Is it possible to search the file somehow?

I have tried below sed with no success:

sed -n '/Feb 12 00:00:54/ , /Feb 13 00:50:28/p' /var/log/myserver--access_log

Maybe some grep I can use?

Andy
  • 13
  • 2

1 Answers1

0

just

grep "Feb 12" /var/log/myserver--access_log

should work. You can pipe it directly into a different file by adding

> /path/to/the/file.txt

in the back of the line.

BeerSerc
  • 499
  • 3
  • 6