File tree 2 files changed +40
-1
lines changed
2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ and pairing with smart people at Hashrocket.
9
9
10
10
For a steady stream of TILs, [ sign up for my newsletter] ( https://tinyletter.com/jbranchaud ) .
11
11
12
- _ 859 TILs and counting..._
12
+ _ 860 TILs and counting..._
13
13
14
14
---
15
15
@@ -762,6 +762,7 @@ _859 TILs and counting..._
762
762
- [ Curling With Basic Auth Credentials] ( unix/curling-with-basic-auth-credentials.md )
763
763
- [ Display All The Terminal Colors] ( unix/display-all-the-terminal-colors.md )
764
764
- [ 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 )
765
766
- [ Do Not Overwrite Existing Files] ( unix/do-not-overwrite-existing-files.md )
766
767
- [ Exclude A Directory With Find] ( unix/exclude-a-directory-with-find.md )
767
768
- [ 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 number Diff line number Diff line change
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.
You can’t perform that action at this time.
0 commit comments