Five Awesome and Small Unix Tools

The UNIX philosophy has always been to tie in small tools and make a bigger whole. During the course of my programming and sysadmin carer, I’ve found these tools to be invaluable, and I’ve often noticed that many people don’t know about them:

Rlwrap

This binds functionality of the readline library to applications which doesn’t have native readline bindings. Ever wanted the bash-shell Ctrl+R reverse history search in another REPL? Just start the program with Rlwrap like so (this is for Jan’s really nice php-shell):

rlwrap php-shell

This sort of a thing makes working with the otherwise clumsy php-shell a breeze.

Daemonize

Often you want to run programs as a daemon but they themselves don’t have any sort of functionality like that. Daemonize comes to the rescue. (For ruby programs that I write I use the similarly named but much more capable daemons gem). Use this like so:

daemonize tail -f log/apache>log > /home/vishnu/.log

Redir

Redir is another gem. It redirects transparently TCP/IP traffic from one port to another IP and port. Use this for IP masking and redirect:

redir --lport=81 --cport=80

Dtach

Dtach is again great at what it does. It’s like daemonize, but it allows you to detach and attach from a running process. I’ve written about this before.

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s