1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-04 23:58:01 +00:00

Add Display The Contents Of A Directory As A Tree as a unix til

This commit is contained in:
jbranchaud
2019-10-29 16:28:37 -05:00
parent 6df5717863
commit 8f248ac4d2
2 changed files with 40 additions and 1 deletions

View File

@@ -0,0 +1,38 @@
# Display The Contents Of A Directory As A Tree
The [`exa` utility](https://github.com/ogham/exa) is a speedy replacement for
`ls` that offers some additional features. One of those extra features is the
_tree_ display.
By including the `-T` (or `--tree`) flag, `exa` will recurse into a directory
and display the entirety of the contents as a tree.
```bash
exa -T
.
├── folder1
│ ├── cats
│ │ └── sneaky
│ └── dogs
│ └── fido
└── folder2
├── cats
│ ├── oreo
│ └── sneaky
└── dogs
└── fido
```
You can target a specific directory:
```bash
exa -T folder2
folder2
├── cats
│ ├── oreo
│ └── sneaky
└── dogs
└── fido
```
See `man exa` for more details.