Snippet called lstree
function lstree(){
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/';
}
Put this in your .bashrc
or .bash_profile
and this will give you a directory breakdown that looks like this:
/my/folder> lstree
|-data
|---nginx
|-----cache
|-etc
|---default
|---nginx
|-----conf.d
|-----sites-enabled
|-----sites-templates
|---ssl
|-----certs
|---varnish
|-----html
|-----lua
|-provision
|---mysql
|-----init
|-usr
|---local
|-----etc
|-------docker-original
|---------php-fpm.d
|-------php
|-------php-fpm.d
|-var
|---lib
|-----mysql
|-------mysql
|-------performance_schema
|-------sys
Remember to re-source your bash file after adding it:
source ~/.bashrc
Top comments (0)