Print folder structure in a fancy way from Linux

PHOTO EMBED

Tue Aug 30 2022 14:27:34 GMT+0000 (Coordinated Universal Time)

Saved by @swina #bash

ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'

# Output will be
# |---folder
# |------file_1
# ...
content_copyCOPY