RSS

diruse

09 Jun

diruse这是一个support tools中的工具,即使在有ps的情况下,依然还是如此好用。展示一下:

[PS] C:\Documents and Settings\exadmin>diruse /m “d:\Exchange server 2007”

    Size (mb)  Files  Directory
       815.88  16679  SUB-TOTAL: D:\EXCHANGE SERVER 2007
       815.88  16679  TOTAL: D:\EXCHANGE SERVER 2007

[PS] C:\Documents and Settings\exadmin>diruse

DIRUSE displays a list of disk usage for a directory tree(s). Version 1.20

DIRUSE [/S | /V] [/M | /K | /B] [/C] [/,] [/Q:# [/L] [/A] [/D] [/O]] [/*] DIRS

/S      Specifies whether subdirectories are included in the output.
/V      Output progress reports while scanning subdirectories.  Ignored if /S is
specified.
/M      Displays disk usage in megabytes.
/K      Displays disk usage in kilobytes.
/B      Displays disk usage in bytes (default).
/C      Use Compressed size instead of apparent size.
/,      Use thousand separator when displaying sizes.
/L      Output overflows to logfile .\DIRUSE.LOG.
/*      Uses the top-level directories residing in the specified DIRS
/Q:#    Mark directories that exceed the specified size (#) with a “!”.  (If /M or /K is not specified, then bytes is assumed.)
/A      Specifies that an alert is generated if specified sizes are exceeded.  (The Alerter service must be running.)
/D      Displays only directories that exceed specified sizes.
/O      Specifies that subdirectories are not checked for specified size overflow.
DIRS    Specifies a list of the paths to check.

Note:   Parameters can be typed in any order. And the ‘-‘ symbol can be  used in place of the ‘/’ symbol.

        Also, if /Q is specified, then return code is ONE if any directories are found that exceed the specified sizes.  Otherwise the return code is ZERO.

Example: diruse /s /m /q:1.5 /l /* c:\users

ex01

C:\Documents and Settings\exadmin>diruse /m "c:\Program Files" /* /q:20
Searching for directories that have exceeded 20 megabytes
    Size (mb)  Files  Directory
!       20.44    128  SUB-TOTAL: C:\PROGRAM FILES\Common Files
         0.00      0  SUB-TOTAL: C:\PROGRAM FILES\ComPlus Applications
         5.20     45  SUB-TOTAL: C:\PROGRAM FILES\Internet Explorer
         0.02      4  SUB-TOTAL: C:\PROGRAM FILES\MSBuild
         0.01      1  SUB-TOTAL: C:\PROGRAM FILES\MSXML 6.0
         5.09     12  SUB-TOTAL: C:\PROGRAM FILES\Outlook Express
!       32.42     58  SUB-TOTAL: C:\PROGRAM FILES\Reference Assemblies
!       22.41     74  SUB-TOTAL: C:\PROGRAM FILES\Support Tools
         0.00      0  SUB-TOTAL: C:\PROGRAM FILES\Uninstall Information
         1.04      4  SUB-TOTAL: C:\PROGRAM FILES\Windows NT
        86.64    326  TOTAL

 

ex02

C:\Documents and Settings\exadmin>diruse /m "c:\Program Files" /* /q:20 /d
Searching for directories that have exceeded 20 megabytes
    Size (mb)  Files  Directory
!       20.44    128  SUB-TOTAL: C:\PROGRAM FILES\Common Files
!       32.42     58  SUB-TOTAL: C:\PROGRAM FILES\Reference Assemblies
!       22.41     74  SUB-TOTAL: C:\PROGRAM FILES\Support Tools
        86.64    326  TOTAL

ex03

C:\Documents and Settings\exadmin>diruse /s /m /q:20 /l /* "c:\Program Files" /d
 
Searching for directories that have exceeded 20 megabytes
    Size (mb)  Files  Directory
!       20.44    128  SUB-TOTAL: C:\PROGRAM FILES\Common Files
 
!       22.28     25  C:\PROGRAM FILES\Reference Assemblies\Microsoft\Framework\
v3.0
!       32.42     58  SUB-TOTAL: C:\PROGRAM FILES\Reference Assemblies
 
!       22.41     74  C:\PROGRAM FILES\Support Tools
!       22.41     74  SUB-TOTAL: C:\PROGRAM FILES\Support Tools
 
        86.64    326  TOTAL
Advertisements
 
 

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: