Looking at the space taken up by my copy of the Blender source code:
ldo@theon:projects> du -ks blender
1444272 blender
Most of that is in the commit history:
ldo@theon:projects> du -ks blender/.git
1139640 blender/.git
So how much isn’t?
ldo@theon:projects> du -ks blender/.git blender
1139640 blender/.git
304632 blender
Do you see what happened there? If you specify a directory, and then
its containing directory on the same command, du will subtract the
usage of the former from the latter. This gives you an easy way of determining the space taken up by a directory, not including
particular subdirectories.
This can be broken down even more:
ldo@theon:projects> du -ks blender/.git blender/extern blender/intern blender/source blender
1139640 blender/.git
40536 blender/extern
15712 blender/intern
105188 blender/source
143196 blender
Here, “extern” is various open-source libraries from other sources,
that have been copied into the Blender source tree, while “intern” is code that originated from Blender itself, that has been organized into
its own libraries. And as you can see, there is still a whole bunch
left in other subdirectories.
Does this work recursively?
ldo@theon:projects> du -ks blender/.git blender/intern/cycles blender/intern blender
1139640 blender/.git
8880 blender/intern/cycles
6832 blender/intern
288920 blender
Yes it does. Here we can see that the Cycles renderer makes up a bit
over half the contents of “intern”.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 489 |
Nodes: | 16 (2 / 14) |
Uptime: | 42:05:41 |
Calls: | 9,670 |
Calls today: | 1 |
Files: | 13,716 |
Messages: | 6,169,775 |