June 4, 2018

Solaris tips and tricks

The best tip I can offer is to have nothing to do with Solaris. For anyone who has been spoiled by a modern linux system with all of the Gnu tools, working with solaris is a miserable experience. How far we have come.

The following are things I find myself needing over and over on Solaris and have not yet committed to memory.

Recursive grep

On a modern system, you could do "grep -r fish ." and get what you want. On solaris, this will pretty much do the same thing:
find ./ -type f | xargs grep "fish"

Running "vi" over a network connection

I do this. If you don't have bash available, run and hide or put up with the hideous csh or whatever it is sun provides as the default shell.
bash
setenv TERM=xterm
stty cols 100
vi
And while you are at it, as long as you are running bash, you may as well get "vi" style history editing:
set -o vi
You don't realize how nice filename completion is until you don't have it!