Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
bendaid
· 13y ago · 0 comments
tree does this, don't know about suppressing the actual tree, but it tells you number of files and dirs printed at the end.
Comments
[–]
laumars
13y ago
A regex match will do that easily enough:
tree | egrep -o "[0-9]+ file(s|)"
edit: or you could just tail the output (should have thought of this first!)
tree | tail -n1
[–]
ck2
13y ago
alas it does not show file count per subdirectory