Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I like tree it's a nice way to display my files and the size of folders/directories. But the -h option only shows the size of the directory, not it's contents.

├── [ 16K]  64D9-E862
│   ├── [8.0K]  downloads

I know for a fact that my external drive has more that 16kB in it.

How can I fix that with tree 1.5? Better yet how do I upgrade to 1.6?

share|improve this question

1 Answer 1

up vote 13 down vote accepted

Only for tree 1.6 and above

You might want to look at:

man tree

--du For each directory report its size as the accumulation of sizes of all its files and sub-directories (and their files, and so on). The total amount of used space is also given in the final report (like the 'du -c' command.) This option requires tree to read the entire directory tree before emitting it, see BUGS AND NOTES below. Implies -s.

share|improve this answer
I'd missed that one. I can't see it in my version of man tree I have -u Print the username, or UID # if no username is available, of the file. and -d Print the username, or UID # if no username is available, of the file. –  Pureferret Aug 19 '12 at 12:57
@Pureferret what OS? –  Shutupsquare Aug 19 '12 at 13:00
Ubuntu 12.something –  Pureferret Aug 19 '12 at 13:03
@Pureferret apologies ubu 12.04 ships with tree 1.5, tree 1.6 has the --du flag –  Shutupsquare Aug 19 '12 at 13:14
@Pureferret Thats another question. The short story, download, compile and run. start here launchpad.net/ubuntu/+source/tree/1.6.0-1 if you need further help ubuntu have there own stack exchange askubuntu they may be best to help. –  Shutupsquare Aug 19 '12 at 13:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.