--- loncom/lond 2004/08/27 18:34:31 1.243 +++ loncom/lond 2004/08/28 15:52:51 1.244 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.243 2004/08/27 18:34:31 banghart Exp $ +# $Id: lond,v 1.244 2004/08/28 15:52:51 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -57,7 +57,7 @@ my $DEBUG = 0; # Non zero to ena my $status=''; my $lastlog=''; -my $VERSION='$Revision: 1.243 $'; #' stupid emacs +my $VERSION='$Revision: 1.244 $'; #' stupid emacs my $remoteVERSION; my $currenthostid="default"; my $currentdomainid; @@ -1299,20 +1299,20 @@ sub push_file_handler { # Side Effects: # The reply is written to $client. # + sub du_handler { my ($cmd, $ududir, $client) = @_; my $userinput = "$cmd:$ududir"; - my $obs; - my $rights; - my $uduout=''; - my $udufn; - print $client "from lond not yet\n"; + my $duout=''; + my $du_cmd; + $du_cmd = 'du -ks '.$ududir.' 2>/dev/null)'; + $duout = qx[$du_cmd]; + print $client "$du_cmd -- $ududir -- $duout\n"; return 1; } ®ister_handler("du", \&du_handler, 0, 1, 0); - # # ls - list the contents of a directory. For each file in the # selected directory the filename followed by the full output of