« January 2007 | Main | April 2007 »

February 16, 2007

Stderr .... output to grep

When you use some program like spamassassin, you will notice that the debug information :

spamassassin -D --lint

goes to stderr ... so you cant use grep as straight forward as you want. Here is how to pipe it to grep in bash:

spamassassin --lint -D 2>&1 | grep ....

or spamassassin --lint -D > output.txt 2>&1

to pipe it to a file first.

Disk Hog on Unix

So it often comes to the time to find what is taking all the space on your hard drive and like many things in unix, this isnt so straight forward, du (disk usage) will tell you how to do this, here will show you your top ten offending directories:

du -ha / | sort -n -r | head -n 10

du -ha = disk usage in human readable format ( lowest to highest )
sort -n -r = reverse the order
head -n 10 = top ten

| = pipe the output to the next command

February 14, 2007

Parking Stub

I met with Steve Hearst of the Hearst family and to validate my parking ticket, he signed it.... just thought it was interesting ... a bit of California history.. a bit blurry though

hearst.jpg