I'm trying to sort by size:
% tree -axCF --du --sort=size | grep -e '/$'
├── [ 8658884] 2022-10-09-backup/
├── [ 5923934] f24-01-22-backup/
├── [ 5384825] e2023-01-19-backup/
├── [ 3627525] h24-01-22-npanelize-nselect/
├── [ 2162140] b2022-12-18-backup/
├── [ 1255661] a2022-12-12-backup/
├── [ 996252] 2021-08-12-backup/
├── [ 647677] 2022-11-20-backup/
├── [ 133361] Test/
├── [ 95801] Boneyard/
├── [ 1024] g24-01-22-backup/ < Ooops
├── [ 16031] Misc/
├── [ 1024] Temp/ < Ooops
├── [ 449317] Znt/
│ ├── [ 158892] Boneyard/
│ └── [ 199717] VirginN-functions/
│ ├── [ 34739] backup.1/ < Nothing right in this dir
│ ├── [ 29896] Source/
│ ├── [ 35481] Text/
│ └── [ 98577] virgin/
... as we see, it's not too bad, however there are a few anomalies. Is there some reason for this? Can I do anything about it?
BTW the 'grep' is because, AFAICT, 'tree' won't show you directory content sizes, even if you use '--du', unless you show all files too (you can't use '-d'), and since I don't want to show files I use grep to filter them out. This seems weird, but thereyago.
grep
? I'm thinking maybe there are other values being sorted in the middle that might somehow make this make sense? I am having trouble imagining how, to be honest, but can you check, just in case? – terdon Mar 01 '24 at 19:16tree
are you running? 1.8.0 or earlier perhaps? – Stephen Kitt Mar 01 '24 at 20:09