How to Find File and Directory Sizes in PHP

How to Find File and Directory Sizes in PHP

This php script will search any directory (and all subdirectories under that directory). It will show you the total size of the directory, number of files in the directory, and identify any files > or = to the size specified. When you run this script you will be prompted for the unix directory name and the test file size parameter.

This script can be very helpful if you have multiple ftp users and you want to monitor file or directory sizes.

You can download this script as a .txt file. Remember to rename the file as a .php file.