RE: [PHP] Disk Usage

From: Date: Sun, 23 Sep 2001 02:07:26 +0000
Subject: RE: [PHP] Disk Usage
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-68384@lists.php.net to get a copy of this message
chdir() to the directory you want the size of, and do: $usage = (int)du -sk; // size in kilobytes $usage = (int)du -sb; // size in bytes Now $usage will have the size in integer form. -----Original Message----- From: Scott Poarch [mailto:scott@globalhost.com] Sent: Saturday, September 22, 2001 9:00 PM To: Steve Werby; php-general@lists.php.net Subject: Re: [PHP] Disk Usage Thanks for the quick reply. I've been tring variations on that for a while with little success. This is not necessarily my best hope, but it's the version I happen to be at at the moment: $command = "du > test2"; system($command); Any ideas? -- Scott Poarch http://www.globalhost.com - - - - - - - - - - - - > From: "Steve Werby" <steve-lists@befriend.com> > Organization: Befriend Internet Services LLC > Date: Sat, 22 Sep 2001 20:44:32 -0400 > To: "Scott Poarch" <scott@globalhost.com>, <php-general@lists.php.net> > Subject: Re: [PHP] Disk Usage > > "Scott Poarch" <scott@globalhost.com> wrote: >> I'm trying to find a script that will return the same kind of data I >> get with du. I want a page to list current disk usage by virtual >> domain on our servers. I see the diskfreespace and disk_total_space >> commands, but they doesn't seem to work at all for me. > > If you're on Linux or another un*x, try calling 'du' using system() or > a similar command. > > -- > Steve Werby > President, Befriend Internet Services LLC http://www.befriend.com/ > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#68384) next »