behavior of "df" under root and regular user
Thad P Floryan
thad at cup.portal.com
Tue Aug 7 15:40:57 AEST 1990
All this banter about ``df'' is interesting. You're probably better off,
though, writing your own (for A/UX) or retrieving a freely-redistributable
or PD one from one of the comp.sources.* archive sites.
Conspicuous by its absence is a reply to my question last week whether A/UX
has passed any version of SVVS (System V Validation Suite).
In light of how "simple" programs I've just ported over break, it would seem
to me that A/UX has NOT passed any SVVS. Let's just take as a for-instance
the ``df'' program and a shell script I wrote aeons ago that has worked on
EVERY, repeat, every, UNIX box except for A/UX. The systems I've tested
include my own 3B1's (SysV), HP-UX (various versions), UTS (Amdahl), Sequent,
Motorola, Convergent, etc etc etc
First the shell script:
ksh 203/206> cat /usr/local/bin/diskfree
#
set `df`
while [ "$1" != "" ]
do
echo "\"$2 MBytes free = \"; scale=5; ($3 * 512)/1000000" | bc
shift;shift;shift;shift;shift;shift
done
exit 0
#
ksh 203/206>
Now let's see it run on various systems:
****************
AT&T 3B1 Systems
================
ksh 203/206> date
Mon Aug 6 22:08:41 PDT 1990
ksh 203/206> df
/ (/dev/fp002): 8080 blocks 10683 i-nodes
ksh 203/206> diskfree
(/dev/fp002): MBytes free = 4.13696
ksh 203/206> slogin thadlabs
Establishing connection to thadlabs ... Connected.
Welcome to ThadLABS System #2, AT&T UNIX System V, Release 3.51a
Please login: thad
Password:
Please type the terminal name and press RETURN: dt80
2% of the storage space is available.
Last login Mon 6-Aug-90 21:27:33
ksh 7123/7124> df
/ (/dev/fp002): 3372 blocks 9426 i-nodes
ksh 7123/7124> diskfree
(/dev/fp002): MBytes free = 1.72646
ksh 7123/7124> exit
Node thadlabs: StarLAN Disconnected.
ksh 203/206>
**********************
a big HP-UX HP9000-855
======================
ksh 1/14123> date
Mon Aug 6 21:27:30 PDT 1990
ksh 1/14123> df
/logs (/dev/dsk/c5d0s2): 198002 blocks 184281 i-nodes
/usr/spool/notes (/dev/dsk/c2000d0s8): 214510 blocks 112845 i-nodes
/usr/spool (/dev/dsk/c2d0s10): 49700 blocks 51822 i-nodes
/usr/local (/dev/dsk/c3d0s9): 32144 blocks 64016 i-nodes
/usr (/dev/dsk/c0d0s11): 21406 blocks 124662 i-nodes
/users (/dev/dsk/c1d0s2): 47194 blocks 156327 i-nodes
/users2 (/dev/dsk/c2d0s9): 40758 blocks 63996 i-nodes
/scratch (/dev/dsk/c2d0s7): 40972 blocks 31918 i-nodes
/users3 (/dev/dsk/c3d0s10): 78260 blocks 49930 i-nodes
/libraries (/dev/dsk/c3d0s7): 59338 blocks 29939 i-nodes
/users4 (/dev/dsk/c2000d0s10): 43994 blocks 37030 i-nodes
/tmp (/dev/dsk/c2d0s3): 48876 blocks 13872 i-nodes
/ (/dev/dsk/c0d0s0): 1386 blocks 8301 i-nodes
ksh 1/14123> diskfree
(/dev/dsk/c5d0s2): Mbytes free = 101.37702
(/dev/dsk/c2000d0s8): Mbytes free = 109.82912
(/dev/dsk/c2d0s10): Mbytes free = 25.44640
(/dev/dsk/c3d0s9): Mbytes free = 16.45772
(/dev/dsk/c0d0s11): Mbytes free = 10.95987
(/dev/dsk/c1d0s2): Mbytes free = 24.16332
(/dev/dsk/c2d0s9): Mbytes free = 20.86809
(/dev/dsk/c2d0s7): Mbytes free = 20.97766
(/dev/dsk/c3d0s10): Mbytes free = 40.06912
(/dev/dsk/c3d0s7): Mbytes free = 30.38105
(/dev/dsk/c2000d0s10): Mbytes free = 22.52492
(/dev/dsk/c2d0s3): Mbytes free = 25.02451
(/dev/dsk/c0d0s0): Mbytes free = 0.70963
ksh 1/14123>
********************
a smaller HP9000-355
====================
ksh 15216/15217> date
Mon Aug 06 21:32:34 PDT 1990
ksh 15216/15217> df
/users (/dev/dsk/1s0): 2810 blocks 13919 i-nodes
/ (/dev/dsk/0s0): 10942 blocks 42969 i-nodes
ksh 15216/15217> diskfree
(/dev/dsk/1s0): Mbytes free = 1.43872
(/dev/dsk/0s0): Mbytes free = 5.60230
ksh 15216/15217>
**********************
and now one of my A/UX
======================
ksh 1/260> date
Mon Aug 6 22:10:33 PDT 1990
ksh 1/260> df
/ /dev/dsk/c0d0s0 27252 blocks 9704 i-nodes
/users/accent/dev/dsk/c4d0s0 150852 blocks 23608 i-nodes
ksh 1/260> diskfree
/dev/dsk/c0d0s0 MBytes free = 13.95302
150852 MBytes free = syntax error on line 1, teletype
diskfree[5]: shift: bad number
ksh 1/260>
WHY isn't there some white-space between "/users/accent" and "/dev/dsk/c4d0s0"?
Sheesh.
BTW, my A/UX 2.0 stuff arrived today; not bad, one week from date of order.
Also BTW, my Apple Developer's Handbook arrived today, too. Hmmm, who in their
right mind is gonna pay $25/hour for AppleLink? That same $25 buys me 2.5
months on PORTAL, NetCom or brt.com (any time of day, any session duration,
any baud up to 19.2K) with full access to the world Usenet community.
Thad Floryan [ thad at cup.portal.com (OR) ..!sun!portal!cup.portal.com!thad ]
More information about the Comp.unix.aux
mailing list