Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
bendaid
on Sept 10, 2013
|
parent
|
context
|
favorite
| on:
Unix Commands I Wish I’d Discovered Years Earlier
tree does this, don't know about suppressing the actual tree, but it tells you number of files and dirs printed at the end.
laumars
on Sept 10, 2013
|
next
[–]
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
on Sept 10, 2013
|
prev
[–]
alas it does not show file count per subdirectory
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: