Replacing tree with eza - total directories/files count #1649
Unanswered
tony-sol
asked this question in
Q&A, Howto, Help
Replies: 1 comment
|
There's no built-in flag for it. You can wrap eza in a function that appends the counts: etree() {
eza --long --tree --classify=auto --color=auto --icons=auto \
--hyperlink --follow-symlinks --almost-all \
--group-directories-first --smart-group --time=changed \
--git --git-repos "$@"
local dirs files
dirs=$(eza -1 -D -R "$@" 2>/dev/null | wc -l)
files=$(eza -1 -f -R "$@" 2>/dev/null | wc -l)
printf '\n%d directories, %d files\n' "$dirs" "$files"
}
Drop that in your |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I want to switch from tree, with these aliases
Result is almost the same, e.g.:
But here is the question - is there a way to make eza print total directories/files count like tree does?
All reactions