Results 1 to 9 of 9
  1. #1

    Script or Utility Needed

    Hi,

    This sounds crazy but I need to be able to find our how much room a client has taken on one of our virtual servers (we resell). I have been told by the support desk at the hosting company that the only way I can find this out is to add up every file in the root directory manually. This is insane but they will not budge on this.

    Does any one know of a script or utility I can place in the root that will report back on the size of the folder and all sub folders contained.

  2. #2
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    771
    CPANEL?

  3. #3
    Will that work on WIN2K on a non dedicated server (virtual account)

  4. #4
    Join Date
    Jun 2002
    Location
    TO, Ontario, Canada
    Posts
    372
    Write an ASP script

  5. #5
    Join Date
    Jul 2002
    Location
    Israel
    Posts
    351
    du -sH /usr/home/client
    Last edited by MarkIL; 11-08-2002 at 10:28 AM.
    C#/C++/TCL/Python/PHP developer.
    mark at mark org il

  6. #6
    Join Date
    Dec 2001
    Location
    Detroit, MI
    Posts
    1,067
    If the environment is a UNIX derivative or in the case of Win32 they have Cygwin, MKS, or some other UNIX tools then the following command should work if executed from a shell (as root):
    echo "0 `find / -uid 501 -printf " + %k" 2>/dev/null`" | bc
    Substitute the 501 with the uid of the actual user.
    <!-- boo! -->

  7. #7
    Join Date
    Oct 2002
    Location
    MO, USA
    Posts
    1,104
    Do a search at a scripting site like hotscripts.com or aspin.com. I've found at least a handful or so that will provide a file list on an ASP page with sizes of all subdirectories directly under the script folder.

  8. #8
    Sorted it. Thanks Alex. I tried Scriptsearch prior to posting, never thought of Aspin.

    Cheers

  9. #9
    Join Date
    Jun 2002
    Location
    Tennessee
    Posts
    61
    <%
    dir = Request("dir")
    set directory=server.createobject("scripting.filesystemobject")
    set allfiles=directory.getfolder("d:\domains\users\")
    for each directory in allFiles.subfolders
    if right(directory.Name,3) <> "cnf" then
    total_size=total_size + directory.size %>
    <% end if
    next %>
    <%= formatnumber((total_size/1024/1024),2) %>

    change the d:\domains\users\ to whatever path they are at, and save it as an ASP page.. Call the asp page in a web browser..
    |Layerblue Networks - What Can Blue Do For You?
    |Offering Windows Web Hosting Solutions Since 2002
    |Windows 2003 Web Hosting - Shared Hosting - Reseller Hosting - Multiple Domain Hosting

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •