Location: PHPKode > projects > My SQL Data Browser > du.php
<?php
/************************************************************/
/* $Id: du.php,v 1.4 2009/05/08 20:19:22 engine Exp engine $  */
/* Copyright (c) Ohad Aloni 2009. All rights reserved. */
/* Released under http://www.theora.com/license.txt (BSD) */
/************************************************************/
// a useful utility for scripting
/************************************************************/
header("Content-Type: text/plain");
if ( isset($_REQUEST['d']) )
 $dir = $_REQUEST['d'];
else
 $dir='~';
if ( isset($_REQUEST['h']) )
 $minCap = $_REQUEST['h'];
else
 $minCap=1000;
$cmd = "du -a $dir | awk '$1 > '$minCap | sort -n -r";
/*	echo "$cmd\n";	*/
passthru($cmd);
/************************************************************/
?>
Return current item: My SQL Data Browser