folderstats
folderstats copied to clipboard
Feature Request: Option to add a column for size on disk (blocks *
It looks like folderstats uses the actual size of the file in bytes when computing directory totals. While it is useful to know the sum of the actual files sizes contained in a directory, this doesn't match actual disk usage reported by utilities like du.
A small file might only use a few hundred bytes, but the file may take up a whole 4K disk block or whatever the file system allocation units are.
./bin/normalizer,normalizer,,253,2024-01-19 13:35:29,2024-01-19 13:35:29,2024-01-19 13:35:29,False,,1,1001
./bin/activate.fish,activate,fish,1995,2024-01-19 13:29:57,2024-01-19 13:29:57,2024-01-19 13:29:57,False,,1,1001
./bin/pip3,pip3,,241,2024-01-19 13:31:23,2024-01-19 13:31:23,2024-01-19 13:31:23,False,,1,1001
./bin/activate.csh,activate,csh,855,2024-01-19 13:29:57,2024-01-19 13:29:57,2024-01-19 13:29:57,False,,1,1001
./bin/pip3.11,pip3,11,241,2024-01-19 13:31:23,2024-01-19 13:31:23,2024-01-19 13:31:23,False,,1,1001
./bin/pip3.9,pip3,9,241,2024-01-19 13:31:23,2024-01-19 13:31:23,2024-01-19 13:31:23,False,,1,1001
./bin/activate,activate,,1906,2024-01-19 13:29:57,2024-01-19 13:29:57,2024-01-19 13:29:57,False,,1,1001
./bin/easy_install,easy_install,,250,2024-01-19 13:29:56,2024-01-19 13:29:56,2024-01-19 13:29:56,False,,1,1001
./bin/folderstats,folderstats,,239,2024-01-19 13:35:40,2024-01-19 13:35:40,2024-01-19 13:35:40,False,,1,1001
./bin/f2py,f2py,,236,2024-01-19 13:35:03,2024-01-19 13:35:03,2024-01-19 13:35:03,False,,1,1001
./bin/pip,pip,,241,2024-01-19 13:31:23,2024-01-19 13:31:23,2024-01-19 13:31:23,False,,1,1001
./bin/Activate.ps1,Activate,ps1,8834,2024-01-19 13:29:57,2024-01-19 13:29:57,2024-01-19 13:29:57,False,,1,1001
./bin/easy_install-3.9,easy_install-3,9,250,2024-01-19 13:29:56,2024-01-19 13:29:56,2024-01-19 13:29:56,False,,1,1001
./bin,bin,,15782,2024-01-19 13:29:51,2024-01-19 13:35:40,2024-01-19 13:35:40,True,13.0,1,1001
$ du -h bin
64k bin
$ stat bin/normalizer
File: bin/normalizer
Size: 253 Blocks: 8 IO Block: 4096 regular file
Device: 802h/2050d Inode: 1796015 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 1001/ rct) Gid: ( 701/ rct)
Access: 2024-01-19 13:35:29.689928731 -0500
Modify: 2024-01-19 13:35:29.689928731 -0500
Change: 2024-01-19 13:35:29.689928731 -0500
Birth: 2024-01-19 13:35:29.689928731 -0500
``
The bin directory for this pyvenv is 64K according to `du`, but only 15.4K as reported by folderstats. The file `normalizer` is 253 bytes but is allocated 8 * 512 byte blocks.
Thanks!