Closed mid-kid closed 2 years ago
Hi mid-kid, seems like a reasonable suggestion. Maybe --max-depth 1
or --depth 1
?
Would be good to check what common flag names are for those. So far it seems it's not very consistent:
find
has -maxdepth
;tree
has -L
for level;fd
has -d
, --max-depth
Can you try out the 3.1 release branch, it has --max-depth
.
curl -Lfs https://raw.githubusercontent.com/haampie/libtree/release/3.1/libtree.c | ${CC:-cc} -o libtree -x c - -std=c99 -D_FILE_OFFSET_BITS=64
I'd like to list only the direct dependencies of a binary or library. Line
readelf -p <file> | grep 'NEEDED'
does, but with the prettier output (and more concise command) this tool provides.This is useful for making sure I get my dependency specifications right for a package.