1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

JustHost Files Limit increased to 200,000

Discussion in 'Web Hosting' started by ijof9, Jan 9, 2012.

  1. ijof9

    ijof9 Power Member

    Joined:
    Mar 27, 2010
    Messages:
    536
    Likes Received:
    594
    Occupation:
    CTO
    Location:
    Western Europe
    I just got off the chat with JustHost support. The used-to-be 50,000 inodes (files & folders) hosted inside one shared hosting account recently got up to 200,000.

    For those of you who don't know, when you go off the limit, your account gets suspended and you have to start deleting. You need to keep a weekly eye on how many files you have; for autobloggers, images & cache files will increase the number of files.

    Here's a script to count. Save it under jack-sparrow.php and put it in /public_html, then access via www.your-site.com/jack-sparrow.php.

    Code:
    <?php 
    function count_files($path) {
     
        $file_count = 0;
        $dir_handle = opendir($path);
     
        if (!$dir_handle) return -1;
        while ($file = readdir($dir_handle)) {
            if ($file == '.' || $file == '..') continue;
            if (is_dir($path . $file)){      
                $file_count += count_files($path . $file . DIRECTORY_SEPARATOR);
            }
            else {
                $file_count++; 
            }
        }
     
        closedir($dir_handle);
        return $file_count;
    }
    
    die('INODES: '.count_files(dirname(__FILE__).'/'));