Logdatein filter - vi?
Ich suche ein Editor/Tool bzw. den dazu passenden Befehl. Ich möchte von Logdateien nur bestimmte Zeile angezeigt (oder als tmp-Datei) bekommen. Beispiel bei einer Apache Logfile, ich möchte nur alle Zeilen sehen, welche
string "87.x.x.x" und string "example.html" enhält
oder
string "87.x.x.x" aber nicht string ".gif" enhält
Wie macht ihr das? Vermute das geht schon fix mit boardmitteln wie VI. Kann mir jemand den Syntax verraten oder ein tool empfehlen?
string "87.x.x.x" und string "example.html" enhält
oder
string "87.x.x.x" aber nicht string ".gif" enhält
Wie macht ihr das? Vermute das geht schon fix mit boardmitteln wie VI. Kann mir jemand den Syntax verraten oder ein tool empfehlen?
Please also mark the comments that contributed to the solution of the article
Content-Key: 257733
Url: https://administrator.de/contentid/257733
Printed on: April 24, 2024 at 19:04 o'clock
3 Comments
Latest comment
Zitat von @methomas:
string "87.x.x.x" und string "example.html" enhält
oder
string "87.x.x.x" aber nicht string ".gif" enhält
string "87.x.x.x" und string "example.html" enhält
oder
string "87.x.x.x" aber nicht string ".gif" enhält
Mit cat, grep und less?
lks
PS: Unix grep regex containing 'x' but not containing 'y'