Whole document tree
11.4. Total Bytes in the Current DirectoryIf you want to know how much space the contents of the current directory take up, you can use something like the following:
Code courtesy (in part) of Sam Schmit (<id at pt dot lu>) and his uncle Jean-Paul, who ironed out a fairly major bug in my original code, and just generally cleaned it up. Relative speed: this process takes between 3.2 and 5.8 seconds in /usr/bin/ (14.7 meg in the directory) on an unloaded 486SX25, depending on how much of the information is cached (if you use this in a prompt, more or less of it will be cached depending how long you work in the directory). |