Solaris-2.6 and du

Sun-Managers,

===================

 Original question

===================

  I really like having du (disk usage) display in Kbytes. It is easy to

  estimate Mbytes. What happened to du -k in Solaris-2.6 (running on

  SPARCstation LX)? The manual page shows:

    SYNOPSIS

       /usr/bin/du [ -adkr ] [ -s | -o ] [ file... ]

       /usr/xpg4/bin/du [ -a | -s ] [ -krx ] [ file... ]

    OPTIONS

       -k Write the files sizes in units of 1024 bytes, rather

            than the default 512-byte units.

       -s Instead of the default output, report only the total

            sum for each of the specified files.

  I ran tests:

    ------------------------------

    Solaris-2.5 Command Response

    ------------------------------

      /usr/bin/du -s 1002

      /usr/bin/du -ks 501

      /usr/xpg4/bin/du -s 1002

      /usr/xpg4/bin/du -ks 501

      /usr/ucb/du -s 501

    ------------------------------

    Solaris-2.6 Command Response

    ------------------------------

      /usr/bin/du -s 3520

      /usr/bin/du -ks 1760

      /usr/xpg4/bin/du -s 16032

      /usr/xpg4/bin/du -ks 8016

      /usr/ucb/du -s 8016

==========

 Response

==========

  1. There's a better version of du and df in the GNU fileutils package.

     ftp://prep.ai.mit.edu/pub/gnu/

=========

 Outcome

=========

  First, my reporting of the results for Solaris-2.6 were erroneous. I

  obtained the GNU fileutils package and installed it. Then I re-ran

  all the commands plus the GNU du. The GNU command also DOES NOT WORK

  PROPERLY under Solaris-2.6.

    ------------------------------

    Solaris-2.5 Command Response

    ------------------------------

      /usr/bin/du -s 3852

      /usr/bin/du -ks 1926

      /usr/xpg4/bin/du -s 3852

      /usr/xpg4/bin/du -ks 1926

      /usr/ucb/du -s 1926

      /usr/local/bin/du -s 1926 <-- GNU command

    ------------------------------

    Solaris-2.6 Command Response

    ------------------------------

      /usr/bin/du -s 61632

      /usr/bin/du -ks 30816

      /usr/xpg4/bin/du -s 61632

      /usr/xpg4/bin/du -ks 30816

      /usr/ucb/du -s 30816

      /usr/local/bin/du -s 30816 <-- GNU command

     

===========

 Thanks to

===========

  Karl Vogel

Respectfully submitted,

  Tom

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  Tom Kinter tmk@mayo.edu 507-284-4981

    Mayo Foundation

    200 First St. SW

    Rochester, Minnesota 55905 USA

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[4346 byte] By [CodeProf.com] at [2007-12-25 11:26:00]