4 ms·
cat /var/log/syslog | grep -i 'problem' is also a query on the `/var/log/syslog` "database". What would be really cool is a RDBMS where the single pieces of d
by gioele 12y ago
cat /var/log/syslog | grep -i 'problem'
is also a query on the `/var/log/syslog` "database".
What would be really cool is a RDBMS where the single pieces of data in the cells are related to each other. For example the user IDs in the authentication log could be matched with the IDs present in the request log.
- melling 12y agoWhy add the extra cat command? grep -i 'problem' /var/log/syslog
- coriny 12y agoHe's after this weeks "Useless use of cat" award: http://www.smallo.ruhr.de/award.html#cat http://www.smallo.ruhr.de/award.html#cat Good to see there's still some competitors out there.
- zem 12y agopipelines read better left to right
- Hello71 12y ago</var/log/syslog grep -i 'problem'
- stonogo 12y agobecause invariably you're going to want to recall this command from history and insert "grep -v HostnameIDontCareAbout" between the cat and the grep. or you're going to want to replace "grep -i 'problem'" with "awk '/problem/ { print $3 }". or you're going to want to do both. people whine about 'useless use of cat' like it's still 1982, but the fact is that it's convenient for iterative development of a pipeline in situ and it costs nothing.
- diltonm 12y agoApache Drill lets you search logs using column base requirements. https://cwiki.apache.org/confluence/display/DRILL/Querying+a+File+System https://cwiki.apache.org/confluence/display/DRILL/Querying+a... It doesn't work on files with no extension yet or at least there's a bug report on it: https://issues.apache.org/jira/browse/DRILL-1320?filter=-3 https://issues.apache.org/jira/browse/DRILL-1320?filter=-3
- niutech 12y agoHave a look at lnav: http://tstack.github.io/lnav/ http://tstack.github.io/lnav/