Skip to content

Commit 8f248ac

Browse files
committed
Add Display The Contents Of A Directory As A Tree as a unix til
1 parent 6df5717 commit 8f248ac

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and pairing with smart people at Hashrocket.
99

1010
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
1111

12-
_859 TILs and counting..._
12+
_860 TILs and counting..._
1313

1414
---
1515

@@ -762,6 +762,7 @@ _859 TILs and counting..._
762762
- [Curling With Basic Auth Credentials](unix/curling-with-basic-auth-credentials.md)
763763
- [Display All The Terminal Colors](unix/display-all-the-terminal-colors.md)
764764
- [Display Free Disk Space](unix/display-free-disk-space.md)
765+
- [Display The Contents Of A Directory As A Tree](unix/display-the-contents-of-a-directory-as-a-tree.md)
765766
- [Do Not Overwrite Existing Files](unix/do-not-overwrite-existing-files.md)
766767
- [Exclude A Directory With Find](unix/exclude-a-directory-with-find.md)
767768
- [Figure Out The Week Of The Year From The Terminal](unix/figure-out-the-week-of-the-year-from-the-terminal.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Display The Contents Of A Directory As A Tree
2+
3+
The [`exa` utility](https://github.com/ogham/exa) is a speedy replacement for
4+
`ls` that offers some additional features. One of those extra features is the
5+
_tree_ display.
6+
7+
By including the `-T` (or `--tree`) flag, `exa` will recurse into a directory
8+
and display the entirety of the contents as a tree.
9+
10+
```bash
11+
❯ exa -T
12+
.
13+
├── folder1
14+
│ ├── cats
15+
│ │ └── sneaky
16+
│ └── dogs
17+
│ └── fido
18+
└── folder2
19+
├── cats
20+
│ ├── oreo
21+
│ └── sneaky
22+
└── dogs
23+
└── fido
24+
```
25+
26+
You can target a specific directory:
27+
28+
```bash
29+
❯ exa -T folder2
30+
folder2
31+
├── cats
32+
│ ├── oreo
33+
│ └── sneaky
34+
└── dogs
35+
└── fido
36+
```
37+
38+
See `man exa` for more details.

0 commit comments

Comments
 (0)