Display file tree

If you want to display a file structure of a folder and the tree command is not available, use sed to replace to create a tree structure based on the find output.

Following command was invoked on rhel 7.1 (Red Hat Enterprise Linux).

tan@cinhtau:~$ find metrics -print | sed 's;[^/]*/;|---;g;s;---|; |;g'
| |---mbean-ws-endpoint.xml
| |---mbean.xml
| |---mbean-security.xml
| |---mbean-ws-endpoint_v2.xml
| |---mbean-ejb.xml
| |---mbean-endpoint.xml