If you use tree -r
, then reverse all lines, e.g., using tac
and translate the box-characters it looks reasonable:
#!/bin/sh
tree --dirsfirst -r | tac | sed -e 's/\d226\d148\d148/\d226\d148\d140/'
# 0x2514 is lower-left-corner,
# 0x250c is upper-left-corner
# 0x2514: 9492 022424 0x2514 text "%\024" utf8 \342\224\224
# 0x250c: 9484 022414 0x250c text "%\014" utf8 \342\224\214
I got the Unicode value using the character-identifier in vi-like-emacs, and the UTF-8 equivalent using my hex
utility.
Here's the end of my /etc
directory, to illustrate:
├── xdg
│ ┌── catalog
│ ├── catalog.old
│ ├── docbook-xml.xml
│ ├── docbook-xml.xml.old
│ ├── docbook-xsl.xml
│ ├── docbook-xsl.xml.old
│ ├── rarian-compat.xml
│ ├── sgml-data.xml
│ ├── sgml-data.xml.old
│ ├── xml-core.xml
│ ├── xml-core.xml.old
│ │ ┌── CatalogManager.properties
│ ├── resolver
├── xml
│ ┌── includes
│ ├── xpdfrc
├── xpdf
│ ┌── newuser.zshrc.recommended
│ ├── zlogin
│ ├── zlogout
│ ├── zprofile
│ ├── zshenv
│ ├── zshrc
├── zsh
.
For reference:
UTF-8 encoding table and Unicode characters
page with code points U+2500 to U+25FF