home *** CD-ROM | disk | FTP | other *** search
- DIRSIZE v3.0 - Disk usage and wastage in a directory tree
- =========================================================
-
- Copyright (c) 1993 and onwards Simon A Carter for Crystal Software
-
- DirSize is SHAREWARE, and may be trialed for 30 days. If you find DirSize
- useful and plan to continue using it, you must pay for it. See the end of
- the file for more details. Please register on the DirSize mailing list by
- sending email to Simon Carter at launch@ozemail.com.au, with your name and
- any comments.
-
-
- What's New - 22-Oct-1997
- ========================
-
- * For redirected reports, now includes
- 1. Form feed so they can be more easily printed
- 2. Date and time of creation (very useful for archiving and
- comparison)
- * Now supports scrolling in both directions, with full support for
- [Up], [Down], [Pg Up], [Pg Dn], [Home] and [End].
- * While scrolling, the wastage display can be turned on and off,
- the wastage display format can be changed to and from
- percentage/count and the tree characters can be toggled between
- graphic and ASCII.
- * Can now handle directory tree up to 3000 levels deep
- (impossible).
- * Now skips processing directories that are too deep for DOS to
- handle (79 characters long under DOS, 255 under Windows 95).
-
-
- Benefits
- ========
-
- DirSize shows you how much disk space is used and wasted in each
- directory.
-
- Its uses include:
-
- * Finding space hogs on a network
- * Finding multiple copies of a single application on a server
- * Finding which directories could be archived to save space
- (typically those that contain lots of small files)
- * Finding where most of the disk space is used
- * Finding applications to remove before installing a new one
- * Previewing the benefits of a smaller cluster size
- * Generating daily, weekly or monthly reports showing how the disk
- space distribution has changed. You can easily generate tab- or
- comma-delimited output to feed directly into your favourite
- spreadsheet for further analysis
- * Showing you the complete directory tree
-
- On large hard disks up to 1/4 of the total drive space is wasted! DirSize
- will show you where.
-
- It runs under DOS, Windows 3.x, 95 and NT, and supports long filenames
- under Windows 95.
-
-
- Features
- ========
-
- * Summary statistics for multi-level directories. This is very
- useful for finding the complete size of applications before
- deletion or backup.
- * Displays Windows 95 long filenames.
- * Supports international thousands separators.
- * The directories to be displayed can be limited by their size or
- depth; very useful for eliminating unnecessary detail.
- * For the selected drive, displays actual cluster size, free
- space, used space and capacity.
- * For each directory tree specified, displays cluster size (user-
- selectable), total space used and wastage (as a percentage or as
- a total).
- * For each directory displayed, shows total space, wasted space
- (as a percentage or as a total), and if it has subdirectories,
- the total space used by the directory and all of its
- subdirectories.
- * Shows wasted space for a given cluster size - optimise your
- cluster size before repartitioning your hard disk.
- * Rounds up file sizes to the cluster size for the most accurate
- size information.
- * Size/wastage information includes the size of directories
- themselves.
- * Full scrolling support in either direction. Disabled
- automatically if output is redirected.
- * Output can be redirected to a file or to the printer or into
- another program.
- * The characters used to draw the directory tree can be changed
- from DOS extended ASCII characters to standard ASCII characters
- for other operating systems.
- * Comma-delimited and tab-delimited output formats for easy
- importing into databases, spreadsheets or word processors for
- further analysis or specialised printing.
- * Directory sorting can be disabled.
- * Future proof - directory sizes up to 99 GB are catered for.
- * Progress indicator as it accumulates file information.
-
-
- Installation
- ============
-
- Just copy DIRSIZE.EXE to a directory in your path, for example, to C:\DOS.
- To find out the directories in your path, type
-
- c:\> path [Enter]
-
-
- How to use DirSize
- ==================
-
- Typing
-
- dirsize -? [Enter]
-
- on its own will display usage information.
-
- Usage:
- dirsize [options]
-
- Where [options] is one or more of:
- <directory> Default: Current path
-
- One or more directories can be specified as the starting
- point for DirSize's output. For a DirSize of drives a:, b:
- and the current directory (c:\windows) type:
-
- c:\windows> dirsize a:\ b:\ .
-
- Directory names with special characters such as spaces must
- be entered with double quotes e.g.
-
- c:\> dirsize "Program Files" "windows\start menu" [Enter]
-
- You can perform multiple DirSize command in a single run
- e.g.
-
- c:\> dirsize -1 c:\ -0 d:\
-
- -nosort Do not sort directory names into alphabetical order (the
- default). This may be useful if you are comparing DirSize's
- output to an unsorted listing from the DOS DIR command.
-
- -p Do not paginate the output. Pagination pauses after each
- screenful of output. [Enter] shows the next line, [Esc]
- exits, [End] scrolls continuously to the end of the output,
- and any other key shows the next screen full of output.
- Pagination is automatically disabled when the output is
- redirected.
-
- -size=# Only show directories that use # space or larger. A K, M or
- G suffix can be used to express the value in KBytes (1024
- bytes), MBytes (1024 KBytes) or GBytes (1024 Mbytes). This
- is very useful for finding network space hogs, or for
- eliminating small directories that are of no consequence
- from the display.
-
- -cl=# Show how much disk space would be wasted if the cluster size
- was set to # bytes per cluster. # is restricted by DOS to
- powers of two, but for convenience DirSize allows it to be
- set to any value. This is useful for previewing the result
- of a change in cluster size on a set of files. In general,
- the smaller the cluster size, the smaller the wasted space.
- As for -size=# above, a K, M or G suffix can be used.
-
- -dir Give the same results as a DIR - excluding all wastage
- information.
-
- -# Default: All levels (255)
-
- Limits the number of levels of directories displayed to the
- given value. Eg -1 will only show the first directory level.
- The statistics will include all levels, but they will not be
- displayed. This is very useful if you just need to find out
- how much total space is in use by an application without
- caring how it is divided into sub-directories. A value of 0
- is equivalent to a value of 255 (i.e. all levels).
-
- -comma Print the result in a comma-delimited output format suitable
- for importing into a spreadsheet, database or word
- processor.
-
- -tab Same as -comma above but outputs in tab-delimited format.
-
- -nowaste Do not show wasted space for each directory. The wasted
- space is still included in the totals - it is just not shown
- as a display column.
-
- -asval Show the actual wasted space per directory rather than as a
- percentage of the directory's used space.
-
- -c<+|-> Control which characters to use for drawing lines.
-
- + Uses DOS's graphical line drawing characters even if it
- detects that its output is being redirected.
- - Uses portable text line drawing characters even if it
- detects that its output is not being redirected. This is
- useful if the result is going to be used on another
- computer, for example, on a Unix machine or a Macintosh.
-
- Note: When DirSize detects that its output is being
- redirected, it automatically turns off pagination, and
- selects portable characters to draw lines, such as +, - and
- |. It does this because the output may be sent to a device
- or another computer that does not understand DOS's line
- drawing characters (which are non-portable). When DirSize's
- output goes to the screen, it uses the DOS line drawing
- characters. You can override the default behaviour in either
- case using the -c option
-
-
- DirSize Environment Variable
- ============================
-
- If you regularly use the same settings for DirSize, you can set them in
- the environment variable DirSize. This variable is processed before
- command line options, so anything specified on the command line will
- override it.
-
- e.g.
-
- SET DIRSIZE=-nowaste -c- -nosort
-
- Some of DirSize's command line options require an equals sign. In order to
- use these in an environment variable, change the equal sign (=) to a colon
- (:) eg -cl=# becomes -cl:#.
-
-
- Redirecting Output
- ==================
-
- DirSize's output can be redirected to any device. For example, to save
- DirSize's output to the file output.txt, you can type:
-
- dirsize > output.txt [Enter]
-
- To add DirSize output to an existing file exists.txt, type
-
- dirsize >> exists.txt [Enter]
-
- To send DirSize's output to the printer, type
-
- dirsize > prn [Enter]
-
-
- DirSize Example
- ===============
-
- The output below was generated from running DirSize in the Program Files
- directory (in a DOS shell under Windows 95). All directories smaller than
- 2 MB have been removed from display:
-
- c:\> dirsize -size=2M "Program Files" [Enter]
- DirSize v2.9 Copyright (c) 1993-1997 Simon Carter
-
- Total space Wstd Directory name [dir + subdirs total]
- -------------- ---- ----------------------------------------------
- 32,768 97% C:\Program files [253,329,408]
- 32,768 99% |--Borland [98,500,608]
- 32,768 99% | |--Common Files [4,358,144]
- 4,325,376 10% | | +--Bde
- 4,096,000 6% | |--Database Desktop
- 229,376 37% | +--Delphi 2.0 [90,013,696]
- 9,207,808 9% | |--Bin [9,699,328]
- 32,768 98% | |--Demos [18,710,528]
- 5,898,240 35% | | |--Data
- 32,768 98% | | |--Db [4,292,608]
- 32,768 98% | | +--Doc [3,735,552]
- 30,670,848 2% | |--Help [32,833,536]
- 2,162,688 6% | | +--Tools
- 32,768 99% | |--Images [8,355,840]
- 5,341,184 98% | | +--Buttons
- 9,863,168 58% | |--Lib
- 1,212,416 96% | |--Objrepos [2,097,152]
- 2,293,760 2% | |--Quickrpt
- 557,056 58% | +--Source [3,112,960]
- 32,768 99% |--Common Files [16,547,840]
- 32,768 98% | +--Microsoft Shared [16,515,072]
- 2,293,760 4% | |--Msgraph5
- 2,883,584 6% | +--Proof
- 3,047,424 38% |--Games
- 5,275,648 17% |--Jobint
- 6,684,672 19% |--Norton AntiVirus [7,274,496]
- 2,326,528 7% |--Norton Commander [2,359,296]
- 9,011,200 9% |--Norton Utilities [15,007,744]
- 5,996,544 19% | +--System
- 11,370,496 3% |--Painter3 [15,826,944]
- 753,664 17% |--Plus! [2,457,600]
- 5,603,328 14% |--Resumew [10,027,008]
- 3,342,336 67% | +--Resumes
- 2,162,688 32% |--VendInfo
- 4,194,304 3% |--Visio [21,200,896]
- 2,752,512 14% | |--Add-ons
- 3,244,032 5% | |--Help
- 32,768 99% | |--Stencils [4,882,432]
- 4,849,664 10% | | +--Standard
- 163,840 52% | +--System [4,751,360]
- 2,162,688 23% | +--Filter32
- 6,717,440 9% |--Web3d [37,715,968]
- 1,245,184 4% | |--Catalog [19,496,960]
- 1,441,792 60% | | |--Backdrop [3,407,872]
- 6,684,672 14% | | |--Model
- 2,752,512 53% | | +--Surface [4,554,752]
- 32,768 99% | |--Samples [3,407,872]
- 2,654,208 7% | | +--Stylebmp
- 491,520 7% | +--Webstyle [7,995,392]
- 884,736 56% | +--Surface [3,538,944]
- 2,555,904 8% +--Winres
- -------------- ---- ----------------------------------------------
- 253,329,408 25% Cluster size: 32,768 Wastage: 64,893,638
- -------------- ---- ----------------------------------------------
-
- Drive C: statistics:
- Cluster size: 32,768 bytes
- Free space: 26,247,168 bytes (2% of capacity is free)
- Used space: 1,061,486,592 bytes
- Capacity: 1,087,733,760 bytes
-
-
- Note how all sizes shown (except the wasted space) are integral (whole)
- multiples of the drive's cluster size.
-
-
- What is the "Cluster Size" ?
- ============================
-
- When your computer places files on a disk (both hard disks and floppy
- disks), it must use an integral number of allocation units. The size of
- the allocation units varies depending on the total capacity of the disk.
- This means that if a file is smaller than one complete allocation unit, it
- does not fill the entire allocation unit. For example, lets say we have a
- file that is 300 bytes long. On a floppy disk with an allocation unit of
- 512 bytes, the file will only occupy the first 300 bytes, but since one
- entire allocation unit must be used, the remaining 212 bytes are wasted. A
- file 513 bytes long will occupy 2 allocation units, with 511 bytes wasted.
- An allocation unit is called a CLUSTER. Floppy drives typically use a
- cluster size of 512 bytes or 1,024 bytes, so not much space is wasted.
- Hard disks range from 2,048 bytes (for a 106 MB drive) to 32,768 bytes
- (for a 1.04 GB drive) and even 65,535 bytes, which means that a great deal
- of space is wasted. The cluster size gets bigger with bigger disks for two
- reasons:
-
- 1) A DOS limitation that sets an absolute upper maximum on the total
- number of clusters on a drive (65535).
- 2) The overhead of managing a large number of clusters consumes a
- lot of disk space that cannot be used for anything else.
-
- The DOS DIR command always shows you the size actually in use by the file
- - it does not include the extra 'wasted' space at the end of the cluster.
- This wasted space is sometimes referred to as 'slack' space.
-
-
- Directories use up clusters too
- ===============================
-
- DirSize takes into account the amount of disk space used to store the
- entries within each directory. Normal file, directory and volume label
- entries take up 32 bytes each. Long filename entries can consume between 1
- and 32 additional directory entries (each of 32 bytes).
-
- Even empty directories use a minimum of one cluster - for the current
- directory "." and the parent directory ".." entries. The root directory
- always consumes a fixed and pre-determined amount of disk space which
- cannot be reclaimed, and DirSize excludes the number of entries in the
- root directory from its calculations.
-
- DirSize does not take into account the size of entries that are no longer
- being used. This means that a directory that has had many files deleted
- may display a size lower than that actually in use. DOS never reclaims
- this extra space unless you delete the directory.
-
- To reduce the amount of disk space used by directories, remove directories
- that do not contain any files. Also, if you delete a large number of files
- from one directory (particularly directories containing long filenames),
- move the files to a new directory, remove the old one and then rename the
- new directory to the original name.
-
-
- Lost clusters
- =============
-
- Clusters can become orphaned when DOS is unable to complete changes to the
- disk, for example, when you are forced to reboot your machine or when the
- power is turned off accidentally. These clusters cannot be used until they
- are identified and reclaimed. Use the DOS CHKDSK or SCANDISK command to
- reclaim lost clusters. Lost clusters are considered to be used.
-
-
- Reducing wasted space
- =====================
-
-
- What about Disk Compression ?
- =============================
-
- Disk compression programs like Stacker and DoubleSpace are able to make
- use of the wasted space because they take on the responsibility of storing
- the files themselves. By doing so, they overcome DOS's integral cluster
- size limitation. DirSize's space wasted information may be invalid on
- volumes controlled by these programs, and on some later versions of file
- servers.
-
-
- What about archives ?
- =====================
-
- Storing collections of files in a compressed or uncompressed archive saves
- space, because by grouping all of the files into one large file, only a
- small amount of space is wasted. The archive program uses its own format
- to store the files without wasting space.
-
-
- Partitions - decreasing the cluster size
- ========================================
-
- Partitions subdivide a physical disk drive into a number of logical
- drives. For example, a 500 MB hard disk could be partitioned into two
- 250MB partitions, C: and D:. The advantage of doing this is that the
- cluster size can be smaller, and in general, the amount of wasted space
- will be smaller. The disadvantage is that it takes time to set up (since
- you have to move ALL of your data off the hard disk in order to partition
- it, unless you have a program that can re-partition on the fly), and you
- have to remember which drive your programs are on, and manage space across
- two drives instead of one. For more information on partitions, see the DOS
- FDISK command.
-
-
- Registration
- ============
-
- DirSize is SHAREWARE and may be trialed for a period of 30 days. After
- this time you must either purchase the registered version (for $15) or
- cease using the shareware version.
-
- Please register your USAGE of DirSize by sending email to
- launch@ozemail.com.au, with your name and address, version of DirSize and
- any relevant comments or suggestions. By registering DirSize I can inform
- you of updates or improvements and let you know when the next version is
- released.
-
- If you like and use DirSize, how about linking to my Web site (see below)?
-
-
- Online Web Registration
- =======================
-
- The registered version of DirSize can be purchased and received
- immediately on the Internet, eliminating shipping and handling costs.
-
-
- Albert's Ambry
- --------------
-
- Direct URL:
- http://www.alberts.com/Ambry/Register?File_Name=dirsize.zip&OS=DOS&Source=
- AuthWWW
-
- OR go to
-
- http://www.alberts.com
-
- and search for: DirSize
-
- Click on the "Buy it" hotlink to register DirSize.
-
-
- Crystal Software Order Form
- ===========================
-
- Use this form for orders sent directly to Crystal Software in Australia.
-
- ____ x Single user licence(s) at $15 each: $______
- ____ x Server licence(s) at $150 each: $______
- ____ x Site licence(s) at $300 each: $______
- ____ x Company licence(s) at $500 each: $______
-
- Postage and 3.5" diskette ( ) $10
- OR OR OR
- Deliver to your email address ( ) * free *
-
- Total: $_______
-
-
- Personal details
- ----------------
-
- Name: ____________________________________________
- Email: ____________________________________________
- Company: ____________________________________________
- Address: ____________________________________________
- ____________________________________________
- ____________________________________________
- ____________________________________________
- Phone: ____________________________________________
- Fax: ____________________________________________
-
-
- Visa or MasterCard (*)
- ----------------------
-
- Please tick: ( ) Visa ( ) MasterCard
- Card Number: ____ ____ ____ ____
- Expiry Date: ____/______
-
- Card holder name: ________________________________
-
- Signature: ________________________________
-
- Date: ____________
-
- (*) Please note that these orders are processed by Omnivision
- Technologies, a licensed distributor.
-
-
- Cheques
- -------
- I accept bank cheques and personal cheques drawn on Australian banks.
- For foreign cheques, please include an additional $US 5 to cover my
- bank's foreign cheque charge. Please make cheques payable to Simon
- Carter.
-
-
- Postal money orders
- -------------------
- I accept prepaid postal money orders in Australian dollars.
-
-
- Other Payment Methods
- ---------------------
- I also accept foreign currencies (suitably disguised within an
- envelope) provided they allow an extra $5 for currency conversion.
-
-
- Contact Information
- ===================
-
- I am always happy to hear your comments! If you use and like DirSize, or
- have any suggestions for improvements, please drop me a line! Other user's
- suggestions have made it what it is today.
-
- Email: launch@ozemail.com.au
- WWW: http://www.ozemail.com.au/~launch
- Fax: +61 (3) 9800-3078
- Voice: +61 (3) 9888-3104. After hours number. Please leave a
- contact name, number and time, and I will try to get back
- to you within 24 hours.
- Mail: Simon Carter
- Crystal Software
- 2 / 9 Woodbine Court
- Wantirna
- Victoria 3152
- AUSTRALIA.
-
-
-