The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

check disk usage with PHP, howto?

Discussion in 'General Discussion' started by edhi, Oct 20, 2005.

  1. edhi

    edhi Registered

    Joined:
    Oct 3, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Is it possible to check disk usage of an user with PHP? How?

    Where is cached info of disk usage stored?
     
  2. DigiCrime

    DigiCrime Well-Known Member

    Joined:
    Nov 27, 2002
    Messages:
    399
    Likes Received:
    0
    Trophy Points:
    16
    PHP:
    <?php
    $output 
    exec('du -sh');
    echo 
    "$output";

    ?>
    One way, change it to df or df -h
     
Loading...

Share This Page