Thursday, April 1, 2010

Linux Commands

A few commands I find myself using from time to time and don't want to forget.

To examine a large log with logj4, STDIN, STDOUT, and STDERR printouts all going to the same log file, I find it easier to comb when I can narrow down to specific type(s) of log4j level statements and show them without line breaks.

grep "^\[TRACE\|DEBUG\|INFO\|ERROR\|WARN\|FATAL\]" my.log | less -S

Also, to recursively add files in your svn working copy...

svn status | grep "^\?" | awk '{print $2}' | xargs svn add

No comments: