shithub: 9scripts

ref: 7923e9afe0182b0a723e80f93b0eec30020549ca
dir: /util/df/

View raw version
#!/bin/rc
# df: print file system disk usage
#     usage: df [ server ]
# This is the work of mischief (mischief on freenode) not Fulton Browne (the owner of this repo)
rfork e

hj=/srv/hjfs.cmd
cw=/srv/cwfs.cmd
owner=glenda
server=$1

if(~ $#server 1)
	exec rcpu -h $server -u $owner -c /mnt/term/bin/df

if(! ~ $user $owner)
	exec rcpu -h $sysname -u $owner -c /mnt/term/bin/df

if(test -w $hj)
	echo df >>$hj &&
	cat /dev/kmesg |
	tail -2
if(test -w $cw)
	echo statw >>$cw &&
	read -n 21 $cw