List nice file structure in cli (tree vs ls)


apt-get install tree
tree
.
└── CBB_cloudberry
    └── home
        └── evgeny
            └── data
                ├── 1.txt:
                │   ├── 20160727172014
                │   │   └── 1.txt
                │   ├── 20160727180425
                │   │   └── 1.txt
                │   └── 20160727180514
                │       └── 1.txt
                ├── 2.txt:
                │   ├── 20160727172016
                │   │   └── 2.txt
                │   ├── 20160727180431
                │   │   └── 2.txt
                │   └── 20160727180520
                │       └── 2.txt
                ├── 3.txt:
                │   ├── 20160727172019
                │   │   └── 3.txt
                │   ├── 20160727180437
                │   │   └── 3.txt
                │   └── 20160727180527
                │       └── 3.txt
                └── 4.txt:
                    └── 20160727180536
                        └── 4.txt

18 directories, 10 files

But how about having it with no extra tools


alias lst="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'"
lst
   .
   |-folder
   |---home
   |-----evgeny
   |-------data
   1.txt
   2.txt
   3.txt
   4.txt
   |---------1.txt:
   |-----------20160727172014
   |-----------20160727180425
   |-----------20160727180514
   |---------2.txt:
   |-----------20160727172016
   |-----------20160727180431
   |-----------20160727180520
   |---------3.txt:
   |-----------20160727172019
   |-----------20160727180437
   |-----------20160727180527
   |---------4.txt:
   |-----------20160727180536
    

In short, this is about:
#tree
#ls
#cli

Start discussion:
Related articles:
109 mac os x cli random password generator preview
Sometimes you need a really solid password. This is really quick way how to obtain such. ... more
over 1 year#macos #password #cli