Monday, February 07, 2005

nl & expand

A good evening to the 3 people reading this blog.

Today I'm going to talk about nl and expand. These two nifty commands come quite handy in some situations (ex. posting to usenet, printing sourcecode, ...).

But what are they all about? Well, here we go:

expand:
expand simply converts tabs to spaces. Nothing more, nothing less. The, by far most usefull option is -t followed by a number. And guess what it does? It lets you specify the count of spaces a tab is substituted with. For the other two commandline options see the man page. :-)

nl:
nl is another goodie. It prints line numbers before each line. Many commandline arguments, all usefull - so just see the man page and get excited.


Maybe that's all for today. Don't know what the night brings.

Thursday, February 03, 2005

Introduction & netstat

As you can guess form the title, this blog is about unix-commands served on a daily basis. Now many people will say: "There are the man-pages, why should one dedicate a blog only to unix-commands!" Well, why not?

We will start with the so usefull netstat.


netstat -s
Some very usefull statistics per different protcoll

netstat -p
Shows what processes are connecting to what ip. You'll love it, give it a try.

netstat -r
Last but not least, the -r argument. Now netstat prints out the kernel routing table.