Archive

Archive for September, 2019

tree command

September 7, 2019 Leave a comment

Problem
You want to visualize the tree structure of the current directory.

Solution
You need the “tree” command. Under Manjaro it was not installed by default, but of course it could be installed easily with the package manager.


$ tree
.
├── greetings
│   ├── english.rs
│   └── french.rs
└── lib.rs

1 directory, 3 files

If you want to ignore a subdirectory, use the “-I” option:


$ tree -I target
.
├── Cargo.lock
├── Cargo.toml
├── src
│   ├── greetings
│   │   ├── english.rs
│   │   └── french.rs
│   └── lib.rs
└── src.old
└── lib.rs

3 directories, 6 files

Categories: linux Tags: , , ,