show a folder tree
Show folders and files as a tree, to see how a project is laid out.
Steps
-
treeeverything under here, as a tree
-
tree -L 2two levels down
-
tree -dfolders only
-
tree -a -I 'node_modules|.git'hidden ones too, without those folders
-
find . -maxdepth 2 | sortwithout tree
Commands used
treefind
Each has a page in lore: lore tree opens it.
Related recipes
- add to the end of a fileAdd lines to a file without replacing it, also to a file only root can write.
- argument list too long"Argument list too long" from rm, cp or mv: too many files for one command line. Hand them over in batches.
- change permissions of a folder and everything in itGive a folder, its subfolders and its files the permissions or the owner they need, without making them open to everyone.
- check a file's permissionsSee who may read, write and run a file or a folder, and why a path is refused.