Re: Directory Size
| From: | Marek Kilimajer | Date: | Fri, 15 Aug 2003 10:36:07 +0000 |
| Subject: | Re: Directory Size | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-159663@lists.php.net to get a copy of this message | ||
Are you sure it hangs? It might take a long time to get occupied size. This also depends on the filesystem used, I heard reserfs is best at this.
Chris Blake wrote:
Greetings learned PHP(eople); Is there a way to calculate the size of directory in PHP ? I searched php.net and only found ways of opening directories and reading file sizes.... One suggestion on there was to do the following : $mstrng = shell_exec('du -sc /backup/'); echo '<pre>' . $mstrng . '<pre>'; When I do that my browser hangs endlessly....mind you, it also hangs when I run du -sc from the command line... Any pointers muchly appreciated...