Peter's Solaris Zone

Some OpenSolaris utilities

Fed up with the utilities that come with Solaris? Then use the source and roll your own. I did!

(The tar file contains all the source files described here in the same locations as they are in the OpenSolaris source. In other words, as a hierarchy including usr/src.)

I'm hoping, of course, to get these changes (not necessarily in exactly the form that I've delivered them here) accepted and put back into the OpenSolaris source proper.

/usr/bin/du and /usr/xpg4/bin/du

This is a merge of the behaviour of the Solaris and XPG4 versions of the du command. Specifically, it lets each understand the other one's options (for example, the regular du understands -x as it should), and adds the -m flag so they can output in megabytes.

Building this in isolation is a bit tricky. At the top level you need to (modify as appropriate for an x86 build):

mkdir -p proto/root_sparc/usr/include
mkdir -p proto/root_sparc/lib
cp usr/src/lib/libcmdutils/libcmdutils.h proto/root_sparc/usr/include
cp /lib/libcmdutils.so.1 proto/root_sparc/lib/libcmdutils.so

Enhanced ptime

This prints out the timings from ptime to full nanosecond (rather than the default millisecond) precision. Note that the hardware or the OS might not actually be that accurate, but you get all the precision that's available.

(This is especially useful for timing short commands on a brand new Opteron box - I was getting fed up with seeing 0.000s returned!)

Again a little tweak to build in isolation (and you have to make ptime from the directory above the source):

mkdir -p proto/root_sparc/usr/include
cp usr/src/lib/libproc/common/libproc.h proto/root_sparc/usr/include

Enhanced prtpicl

This adds a -n option to allow selection of items by picl name as well as (or instead) of their picl class. It allows more flexibility in winnowing the prtpicl output to give you exactly what you want.

Tweaked /usr/ucb/df

This cleans up and speeds up the shell script that is /usr/ucb/df.

This also fixes bug 4838106.

Enhanced /usr/ucb/ls

This adds support for the -e, -E, -h, -@, -S and -n flags to /usr/ucb/ls.

This is an ugly hack. There is an umbrella rfe to drag the ucb stuff into the 21st century, and this is just a short-term fix to get some of the more important enhancements in the main ls back to the ucb version.


Peter's Home | Zone Home