How to Calculate File Slackby Jason Artman
When a hard drive on a computer running Windows is formatted, an \"allocation unit\" size is selected. This is the smallest amount of space that the hard drive can address for a single file. If a file only consumes part of an allocation unit, the remaining portion of the allocation unit cannot be used for another file. These unusable areas of the hard drive are known as \"file slack\" or \"slack space,\" and the amount of slack space on a hard drive tends to be increased as more files are stored on the hard drive. Calculate the possible amount of file slack on your hard drive to determine how much lost space might be reclaimed if you reduced the number of files on the drive.
Click \"Start\" and then click \"Run.\" Type \"cmd\" (without the quotation marks) into the dialog box and press \"Enter.\" The command prompt will appear.
Type the letter of the drive that you would like to calculate the file slack for, e.g. \"C:\" and press \"Enter.\"
Type \"chkdsk\" and press \"Enter.\" This command checks the hard drive for errors but runs the command in read-only mode, so no changes are made to the drive. At the end of this process, the allocation unit size for the drive is displayed--e.g. \"4096 bytes in each allocation unit.\"
Type \"dir /s /b C:\\ |find /c \"\\\"\" and press \"Enter.\" Note that the beginning and ending quotation marks should be excluded, but the quotation marks on either side of the backslash should be included. This command counts the number of files present on the hard drive. If you are working with a drive other than \"C:\" substitute the letter assignment of that drive. The number of files on the drive will be displayed on a single line after this process is complete.
Divide the allocation unit size obtained in Step 3 in half, then multiply the result by the number of files obtained in Step 4. For example, if your allocation unit size is 4096 bytes, and you have 30,000 files on your hard drive, your result would be 2,048 x 30,000 = 61,440,000. This is the approximate number of bytes on the hard drive that are wasted due to file slack.
Items you will need
- Computer running Windows 2000 or later
- Jupiterimages/Pixland/Getty Images